Update app.py
Browse files
app.py
CHANGED
@@ -84,7 +84,7 @@ def predict_and_plot(velocity, temperature, precipitation, humidity):
|
|
84 |
contamination_levels, gradients = predict_contamination_and_gradients(example_data_scaled)
|
85 |
|
86 |
# Simulate contamination levels at multiple time intervals
|
87 |
-
time_intervals = np.arange(0,
|
88 |
|
89 |
# Generate simulated contamination levels (linear interpolation between predicted values)
|
90 |
simulated_contamination_levels = np.array([
|
@@ -189,7 +189,7 @@ with gr.Blocks() as demo:
|
|
189 |
gr.Button(value="Submit", variant="primary").click(
|
190 |
fn=predict_and_plot,
|
191 |
inputs=inputs,
|
192 |
-
outputs= contamination_outputs + gradients_outputs + cleaning_time_outputs)
|
193 |
gr.Button(value="Clear").click(fn=lambda: None)
|
194 |
|
195 |
with gr.Column(scale=1):
|
|
|
84 |
contamination_levels, gradients = predict_contamination_and_gradients(example_data_scaled)
|
85 |
|
86 |
# Simulate contamination levels at multiple time intervals
|
87 |
+
time_intervals = np.arange(0, 3601, 60) # Simulating time intervals from 0 to 600 seconds
|
88 |
|
89 |
# Generate simulated contamination levels (linear interpolation between predicted values)
|
90 |
simulated_contamination_levels = np.array([
|
|
|
189 |
gr.Button(value="Submit", variant="primary").click(
|
190 |
fn=predict_and_plot,
|
191 |
inputs=inputs,
|
192 |
+
outputs= [gr.Plot(label="Contamination Levels Over Time")]+ contamination_outputs + gradients_outputs + cleaning_time_outputs)
|
193 |
gr.Button(value="Clear").click(fn=lambda: None)
|
194 |
|
195 |
with gr.Column(scale=1):
|