tilos commited on
Commit
afd3f8f
·
1 Parent(s): 91ff99c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -41,12 +41,12 @@ def get_row():
41
  referenceTime = time.time()
42
 
43
  row ={"referenceTime": referenceTime,
44
- "t": t,
45
- "ws": ws,
46
- "prec1h": prec1h,
47
- "fesn1h": fesn1h,
48
- "vis": vis,
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, every=1)
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())