Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,7 +24,6 @@ scaler_path = os.path.join(script_dir, 'toolkit', 'scaler_X.json')
|
|
| 24 |
rf_model_path = os.path.join(script_dir, 'toolkit', 'rf_model.joblib')
|
| 25 |
mlp_model_path = os.path.join(script_dir, 'toolkit', 'mlp_model.keras')
|
| 26 |
meta_model_path = os.path.join(script_dir, 'toolkit', 'meta_model.joblib')
|
| 27 |
-
image_path = os.path.join(script_dir, 'toolkit', 'car.png')
|
| 28 |
|
| 29 |
# Load the scaler and models
|
| 30 |
try:
|
|
@@ -111,18 +110,10 @@ outputs = [
|
|
| 111 |
gr.Textbox(label="Rear")
|
| 112 |
]
|
| 113 |
|
| 114 |
-
|
| 115 |
fn=gradio_interface,
|
| 116 |
inputs=inputs,
|
| 117 |
outputs=outputs,
|
| 118 |
title="Environmental Factor-Based Contamination Level Prediction",
|
| 119 |
description="Enter the environmental factors to get the contamination levels for Front Left, Front Right, Left, Right, Roof, and Rear LiDARs."
|
| 120 |
-
)
|
| 121 |
-
|
| 122 |
-
with gr.Blocks() as demo:
|
| 123 |
-
with gr.Row():
|
| 124 |
-
interface.render()
|
| 125 |
-
with gr.Row():
|
| 126 |
-
gr.Image(image_path, width=500, height=300) # Adjust the width and height as needed
|
| 127 |
-
|
| 128 |
-
demo.launch()
|
|
|
|
| 24 |
rf_model_path = os.path.join(script_dir, 'toolkit', 'rf_model.joblib')
|
| 25 |
mlp_model_path = os.path.join(script_dir, 'toolkit', 'mlp_model.keras')
|
| 26 |
meta_model_path = os.path.join(script_dir, 'toolkit', 'meta_model.joblib')
|
|
|
|
| 27 |
|
| 28 |
# Load the scaler and models
|
| 29 |
try:
|
|
|
|
| 110 |
gr.Textbox(label="Rear")
|
| 111 |
]
|
| 112 |
|
| 113 |
+
gr.Interface(
|
| 114 |
fn=gradio_interface,
|
| 115 |
inputs=inputs,
|
| 116 |
outputs=outputs,
|
| 117 |
title="Environmental Factor-Based Contamination Level Prediction",
|
| 118 |
description="Enter the environmental factors to get the contamination levels for Front Left, Front Right, Left, Right, Roof, and Rear LiDARs."
|
| 119 |
+
).launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|