Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -83,7 +83,7 @@ def run_new_location_analysis(selected_vendor_id, new_cust_lat, new_cust_lon):
|
|
| 83 |
"""
|
| 84 |
Simulates a new customer location and returns the predicted score and distance.
|
| 85 |
"""
|
| 86 |
-
# Get a random customer to provide the age feature, as
|
| 87 |
random_customer = customers.sample(1).iloc[0]
|
| 88 |
|
| 89 |
# --- FIX: Ensure the selected_vendor is found using a string ID ---
|
|
@@ -176,4 +176,4 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
| 176 |
)
|
| 177 |
|
| 178 |
# Launch the app
|
| 179 |
-
demo.launch(share=True)
|
|
|
|
| 83 |
"""
|
| 84 |
Simulates a new customer location and returns the predicted score and distance.
|
| 85 |
"""
|
| 86 |
+
# Get a random customer to provide the age feature, as is needed by the model
|
| 87 |
random_customer = customers.sample(1).iloc[0]
|
| 88 |
|
| 89 |
# --- FIX: Ensure the selected_vendor is found using a string ID ---
|
|
|
|
| 176 |
)
|
| 177 |
|
| 178 |
# Launch the app
|
| 179 |
+
demo.launch(share=True)
|