Spaces:
Runtime error
Runtime error
import os | |
from shiny import module, App, ui, render, reactive | |
import fastf1 as ff1 | |
import matplotlib.pyplot as plt | |
from matplotlib.collections import LineCollection | |
from matplotlib import cm | |
import numpy as np | |
import shinyswatch | |
def test_ui(): | |
return ui.div( | |
ui.h2("Number + 5"), | |
ui.input_text(id="num_input", label="Enter number:"), | |
ui.output_text_verbatim(id="answer"), | |
) | |
def test_server(input, output, session): | |
def calculation(): | |
try: | |
return int(input.num_input()) + 5 | |
except: | |
return "..." | |
def answer(): | |
return f"The answer is {calculation()}" |