Ziyou Li commited on
Commit
4e9e9f0
·
1 Parent(s): afd3f8f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -4
app.py CHANGED
@@ -70,9 +70,23 @@ 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())
77
 
78
- interface.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
+
84
+ # btn = gr.Button(value="Refresh")
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()