Update app.py
Browse files
app.py
CHANGED
@@ -180,25 +180,26 @@ with gr.Blocks() as demo:
|
|
180 |
gr.Markdown("<h1 style='text-align: center;'>Environmental Factor-Based Contamination, Gradient, & Cleaning Time Prediction</h1>")
|
181 |
gr.Markdown("This application predicts the contamination levels, gradients, and cleaning times for different parts of a car's LiDAR system based on environmental factors such as velocity, temperature, precipitation, and humidity.")
|
182 |
|
|
|
183 |
with gr.Row():
|
184 |
-
with gr.Column():
|
185 |
gr.Markdown("### Input Parameters")
|
186 |
for inp in inputs:
|
187 |
inp.render()
|
188 |
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
#
|
202 |
with gr.Row():
|
203 |
with gr.Column(scale=2):
|
204 |
gr.Markdown("### Contamination Predictions")
|
@@ -210,13 +211,15 @@ with gr.Blocks() as demo:
|
|
210 |
for out in gradients_outputs:
|
211 |
out.render()
|
212 |
|
213 |
-
with gr.Column(scale=
|
214 |
gr.Markdown("### Cleaning Time Predictions")
|
215 |
for out in cleaning_time_outputs:
|
216 |
out.render()
|
217 |
|
218 |
-
|
|
|
|
|
219 |
gr.Markdown("### Contamination Levels Over Time")
|
220 |
-
gr.Plot(label="Contamination Levels Over Time")
|
221 |
|
222 |
demo.launch()
|
|
|
180 |
gr.Markdown("<h1 style='text-align: center;'>Environmental Factor-Based Contamination, Gradient, & Cleaning Time Prediction</h1>")
|
181 |
gr.Markdown("This application predicts the contamination levels, gradients, and cleaning times for different parts of a car's LiDAR system based on environmental factors such as velocity, temperature, precipitation, and humidity.")
|
182 |
|
183 |
+
# Top Section: Inputs and Car Image
|
184 |
with gr.Row():
|
185 |
+
with gr.Column(scale=2):
|
186 |
gr.Markdown("### Input Parameters")
|
187 |
for inp in inputs:
|
188 |
inp.render()
|
189 |
|
190 |
+
with gr.Column(scale=1):
|
191 |
+
gr.Image(image_path)
|
192 |
+
|
193 |
+
# Middle Section: Submit and Clear Buttons
|
194 |
+
with gr.Row():
|
195 |
+
gr.Button(value="Submit", variant="primary").click(
|
196 |
+
fn=predict_and_plot,
|
197 |
+
inputs=inputs,
|
198 |
+
outputs=[gr.Plot(label="Contamination Levels Over Time")] + contamination_outputs + gradients_outputs + cleaning_time_outputs
|
199 |
+
)
|
200 |
+
gr.Button(value="Clear").click(fn=lambda: None)
|
201 |
+
|
202 |
+
# Bottom Section: Outputs (Three columns) and Plot Below
|
203 |
with gr.Row():
|
204 |
with gr.Column(scale=2):
|
205 |
gr.Markdown("### Contamination Predictions")
|
|
|
211 |
for out in gradients_outputs:
|
212 |
out.render()
|
213 |
|
214 |
+
with gr.Column(scale=2):
|
215 |
gr.Markdown("### Cleaning Time Predictions")
|
216 |
for out in cleaning_time_outputs:
|
217 |
out.render()
|
218 |
|
219 |
+
# Graph below the outputs
|
220 |
+
with gr.Row():
|
221 |
+
with gr.Column():
|
222 |
gr.Markdown("### Contamination Levels Over Time")
|
223 |
+
gr.Plot(label="Contamination Levels Over Time")
|
224 |
|
225 |
demo.launch()
|