Ziyou Li commited on
Commit
b5dc851
·
1 Parent(s): e6f6142

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -77,16 +77,21 @@ with gr.Blocks() as demo:
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
 
89
- demo.load(get_row, every=10)
90
  # interface = gr.Interface(fn = infer, inputs = inputs, outputs = outputs, title=title, description=description, examples=[get_row()], cache_examples=False)
91
  # interface.launch()
92
 
 
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
+ demo.load(get_row, every=10)
84
+
85
  with gr.Row():
86
  btn_sub = gr.Button(value="Submit")
87
 
88
  btn_sub.click(infer, inputs = inputs, outputs = outputs)
89
+
90
+ #examples = gr.Examples(fn = infer, examples=[get_row()],inputs=inputs,outputs=outputs ,cache_examples=True)
91
+ examples = gr.Examples(examples=[get_row()] ,inputs=inputs, cache_examples=False)
92
 
93
 
94
+
95
  # interface = gr.Interface(fn = infer, inputs = inputs, outputs = outputs, title=title, description=description, examples=[get_row()], cache_examples=False)
96
  # interface.launch()
97