Spaces:
Sleeping
Sleeping
Commit ·
009cb11
1
Parent(s): 7f5452f
new code
Browse files
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=
|
| 44 |
-
gr.LinePlot(get_data, every=
|
| 45 |
with gr.Column():
|
| 46 |
c_time3 = gr.Textbox(label="Health Status")
|
| 47 |
-
gr.LinePlot(get_data, every=
|
| 48 |
-
gr.LinePlot(get_data, every=
|
| 49 |
-
demo.load(lambda: get_data()['location'].iloc[-1], None, c_time2, every=
|
| 50 |
-
demo.load(lambda: get_data()['pump_status'].iloc[-1], None, c_time3, every=
|
| 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()
|