Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -70,23 +70,24 @@ inputs = [gr.Dataframe(row_count = (1, "fixed"), col_count=(7,"fixed"),
|
|
70 |
|
71 |
outputs = [gr.Dataframe(row_count = (1, "fixed"), col_count=(1, "fixed"), label="Predictions", headers=["Congestion Level"])]
|
72 |
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
#
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
|
|
|
|
|
83 |
|
84 |
-
|
85 |
-
# btn.click(interface.launch())
|
86 |
|
|
|
|
|
|
|
87 |
|
88 |
-
interface = gr.Interface(fn = infer, inputs = inputs, outputs = outputs, title=title, description=description, examples=[get_row()], cache_examples=False)
|
89 |
-
|
90 |
-
interface.launch()
|
91 |
if __name__ == "__main__":
|
92 |
demo.queue().launch()
|
|
|
70 |
|
71 |
outputs = [gr.Dataframe(row_count = (1, "fixed"), col_count=(1, "fixed"), label="Predictions", headers=["Congestion Level"])]
|
72 |
|
73 |
+
with gr.Blocks() as demo:
|
74 |
+
with gr.Row():
|
75 |
+
with gr.Column():
|
76 |
+
gr.Dataframe(row_count = (1, "fixed"), col_count=(7,"fixed"),
|
77 |
+
headers=["referenceTime", "t", "ws", "prec1h", "fesn1h", "vis", "confidence"],
|
78 |
+
# datatype=["timestamp", "float", "float", "float", "float", "float"],
|
79 |
+
label="Input Data", interactive=1)
|
80 |
+
with gr.Column:
|
81 |
+
gr.Dataframe(row_count = (1, "fixed"), col_count=(1, "fixed"), label="Predictions", headers=["Congestion Level"])
|
82 |
|
83 |
+
with gr.Row():
|
84 |
+
btn_sub = gr.Button(value="Submit")
|
85 |
|
86 |
+
btn_sub.click(infer, inputs = inputs, outputs = outputs)
|
|
|
87 |
|
88 |
+
demo.load(get_row, every=10)
|
89 |
+
# interface = gr.Interface(fn = infer, inputs = inputs, outputs = outputs, title=title, description=description, examples=[get_row()], cache_examples=False)
|
90 |
+
# interface.launch()
|
91 |
|
|
|
|
|
|
|
92 |
if __name__ == "__main__":
|
93 |
demo.queue().launch()
|