Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -37,14 +37,27 @@ with gr.Blocks() as demo:
|
|
37 |
with gr.Row():
|
38 |
with gr.Column():
|
39 |
c_time2 = gr.Textbox(label="Current Time refreshed every second")
|
40 |
-
gr.Textbox(
|
41 |
-
"Change the value of the slider to automatically update the plot",
|
42 |
-
label="",
|
43 |
)
|
44 |
#gr.Interface(fn = infer, inputs = inputs, outputs = outputs, title=title, description=description,live=True).launch()
|
45 |
|
46 |
|
47 |
demo.load(lambda: datetime.datetime.now(), None, c_time2, every=1)
|
48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
demo.queue().launch()
|
|
|
37 |
with gr.Row():
|
38 |
with gr.Column():
|
39 |
c_time2 = gr.Textbox(label="Current Time refreshed every second")
|
|
|
|
|
|
|
40 |
)
|
41 |
#gr.Interface(fn = infer, inputs = inputs, outputs = outputs, title=title, description=description,live=True).launch()
|
42 |
|
43 |
|
44 |
demo.load(lambda: datetime.datetime.now(), None, c_time2, every=1)
|
45 |
|
46 |
+
|
47 |
+
with gr.Blocks() as demo:
|
48 |
+
with gr.Row():
|
49 |
+
with gr.Column():
|
50 |
+
gr.Dataframe(row_count = (1, "fixed"), col_count=(7,"fixed"),
|
51 |
+
headers=["referenceTime", "t", "ws", "prec1h", "fesn1h", "vis", "confidence"],
|
52 |
+
# datatype=["timestamp", "float", "float", "float", "float", "float"],
|
53 |
+
label="Input Data", interactive=1)
|
54 |
+
with gr.Column:
|
55 |
+
gr.Dataframe(row_count = (1, "fixed"), col_count=(1, "fixed"), label="Predictions", headers=["Congestion Level"])
|
56 |
+
demo.load(lambda: datetime.datetime.now(), None, c_time2, every=1)
|
57 |
+
|
58 |
+
with gr.Row():
|
59 |
+
btn_sub = gr.Button(value="Submit")
|
60 |
+
|
61 |
+
btn_sub.click(infer, inputs = inputs, outputs = outputs)
|
62 |
|
63 |
demo.queue().launch()
|