Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -41,12 +41,12 @@ def get_row():
|
|
41 |
referenceTime = time.time()
|
42 |
|
43 |
row ={"referenceTime": referenceTime,
|
44 |
-
"
|
45 |
-
"
|
46 |
-
"
|
47 |
-
"
|
48 |
-
"
|
49 |
-
"confidence": confidence}
|
50 |
|
51 |
row = pd.DataFrame([row], columns=row.keys())
|
52 |
print(row)
|
@@ -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())
|
|
|
41 |
referenceTime = time.time()
|
42 |
|
43 |
row ={"referenceTime": referenceTime,
|
44 |
+
"temperature": t,
|
45 |
+
"wind speed": ws,
|
46 |
+
"precipation last hour": prec1h,
|
47 |
+
"snow precipation last hour": fesn1h,
|
48 |
+
"visibility": vis,
|
49 |
+
"confidence of data": confidence}
|
50 |
|
51 |
row = pd.DataFrame([row], columns=row.keys())
|
52 |
print(row)
|
|
|
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())
|