deepak6593 commited on
Commit
009cb11
·
1 Parent(s): 7f5452f
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -40,12 +40,12 @@ with gr.Blocks() as demo:
40
  with gr.Row():
41
  with gr.Column():
42
  c_time2 = gr.Textbox(label="Location")
43
- gr.DataFrame(get_data, every=10)
44
- gr.LinePlot(get_data, every=10, x="time", y="Temperature (°C)", y_title="Temperature(sensor)", overlay_point=True, width=500, height=500,color="pump_status",color_legend_position="bottom",)
45
  with gr.Column():
46
  c_time3 = gr.Textbox(label="Health Status")
47
- gr.LinePlot(get_data, every=10, x="time", y="Vibration (mm/s)", y_title="Vibration(sensor)", overlay_point=True, width=500, height=500,color="pump_status",color_legend_position="bottom",)
48
- gr.LinePlot(get_data, every=10, x="time", y="Pressure (psi)", y_title="Pressure(sensor)", overlay_point=True, width=500, height=500,color="pump_status",color_legend_position="bottom",)
49
- demo.load(lambda: get_data()['location'].iloc[-1], None, c_time2, every=10)
50
- demo.load(lambda: get_data()['pump_status'].iloc[-1], None, c_time3, every=10)
51
  demo.queue().launch()
 
40
  with gr.Row():
41
  with gr.Column():
42
  c_time2 = gr.Textbox(label="Location")
43
+ gr.DataFrame(get_data, every=5)
44
+ gr.LinePlot(get_data, every=5, x="time", y="Temperature (°C)", y_title="Temperature(sensor)", overlay_point=True, width=500, height=500,color="pump_status",color_legend_position="bottom",)
45
  with gr.Column():
46
  c_time3 = gr.Textbox(label="Health Status")
47
+ gr.LinePlot(get_data, every=5, x="time", y="Vibration (mm/s)", y_title="Vibration(sensor)", overlay_point=True, width=500, height=500,color="pump_status",color_legend_position="bottom",)
48
+ gr.LinePlot(get_data, every=5, x="time", y="Pressure (psi)", y_title="Pressure(sensor)", overlay_point=True, width=500, height=500,color="pump_status",color_legend_position="bottom",)
49
+ demo.load(lambda: get_data()['location'].iloc[-1], None, c_time2, every=5)
50
+ demo.load(lambda: get_data()['pump_status'].iloc[-1], None, c_time3, every=5)
51
  demo.queue().launch()