Spaces:
Runtime error
Runtime error
Ziyou Li
commited on
Commit
·
91ff99c
1
Parent(s):
8fe2fcb
Update app.py
Browse files
app.py
CHANGED
@@ -38,7 +38,7 @@ def get_row():
|
|
38 |
vis = json_response_smhi["timeSeries"][0]["parameters"][9]["values"][0] # Visibility
|
39 |
|
40 |
# Use current time
|
41 |
-
|
42 |
|
43 |
row ={"referenceTime": referenceTime,
|
44 |
"t": t,
|
@@ -70,7 +70,7 @@ 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 |
-
interface = gr.Interface(fn = infer, inputs = inputs, outputs = outputs, title=title, description=description, examples=[get_row()], cache_examples=False)
|
74 |
|
75 |
btn = gr.Button(value="Refresh")
|
76 |
btn.click(interface.launch())
|
|
|
38 |
vis = json_response_smhi["timeSeries"][0]["parameters"][9]["values"][0] # Visibility
|
39 |
|
40 |
# Use current time
|
41 |
+
referenceTime = time.time()
|
42 |
|
43 |
row ={"referenceTime": referenceTime,
|
44 |
"t": t,
|
|
|
70 |
|
71 |
outputs = [gr.Dataframe(row_count = (1, "fixed"), col_count=(1, "fixed"), label="Predictions", headers=["Congestion Level"])]
|
72 |
|
73 |
+
interface = gr.Interface(fn = infer, inputs = inputs, outputs = outputs, title=title, description=description, examples=[get_row()], cache_examples=False, every=1)
|
74 |
|
75 |
btn = gr.Button(value="Refresh")
|
76 |
btn.click(interface.launch())
|