deepak6593 commited on
Commit
2b2b70e
·
1 Parent(s): 8bef087
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -50,6 +50,6 @@ with gr.Blocks() as demo:
50
  gr.LinePlot(get_data, every=5, x="time", y="Temperature (°C)", y_title="TEMPERATURE(°C)", overlay_point=True, width=500, height=500,color_legend_position="bottom",)
51
  gr.Markdown("# 📈 FLOW RATE VS LEVEL")
52
  gr.LinePlot(get_data, every=5, x="Flow Rate (L/min)", y="Level (%)", x_title="FLOW RATE (L/MIN)",y_title="LEVEL (%)", overlay_point=True, width=500, height=500,color_legend_position="bottom",)
53
- demo.load(lambda: get_data()['location'].iloc[-1], None, c_time2, every=5)
54
- demo.load(lambda: get_data()['pump_status'].iloc[-1], None, c_time3, every=5)
55
  demo.queue().launch()
 
50
  gr.LinePlot(get_data, every=5, x="time", y="Temperature (°C)", y_title="TEMPERATURE(°C)", overlay_point=True, width=500, height=500,color_legend_position="bottom",)
51
  gr.Markdown("# 📈 FLOW RATE VS LEVEL")
52
  gr.LinePlot(get_data, every=5, x="Flow Rate (L/min)", y="Level (%)", x_title="FLOW RATE (L/MIN)",y_title="LEVEL (%)", overlay_point=True, width=500, height=500,color_legend_position="bottom",)
53
+ demo.load(lambda: get_data()['location'].iloc[-1] if not get_data().empty else None, None, c_time2, every=5)
54
+ demo.load(lambda: get_data()['pump_status'].iloc[-1] if not get_data().empty else None, None, c_time3, every=5)
55
  demo.queue().launch()