Chia Woon Yap
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -306,7 +306,7 @@ def predict_hdb_price(town, flat_type, flat_model, floor_area_sqm, storey_level,
|
|
| 306 |
# Get prediction with error handling
|
| 307 |
try:
|
| 308 |
#predicted_price = max(0, float(models['xgboost'].predict(processed_input)[0]))
|
| 309 |
-
predicted_price = max(100000, float(models['xgboost'].predict(processed_input)
|
| 310 |
except Exception as e:
|
| 311 |
print(f"❌ XGBoost prediction error: {e}")
|
| 312 |
# Smarter fallback based on area
|
|
|
|
| 306 |
# Get prediction with error handling
|
| 307 |
try:
|
| 308 |
#predicted_price = max(0, float(models['xgboost'].predict(processed_input)[0]))
|
| 309 |
+
predicted_price = max(100000, float(models['xgboost'].predict(processed_input)))
|
| 310 |
except Exception as e:
|
| 311 |
print(f"❌ XGBoost prediction error: {e}")
|
| 312 |
# Smarter fallback based on area
|