Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -7,7 +7,13 @@ from flask import Flask, request, jsonify
|
|
| 7 |
super_kart_api = Flask("Super Kart Price Predictor")
|
| 8 |
|
| 9 |
# Load the trained machine learning model
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
# Expected feature names from the model (adjust if your training columns differ)
|
| 13 |
EXPECTED_COLUMNS = [
|
|
|
|
| 7 |
super_kart_api = Flask("Super Kart Price Predictor")
|
| 8 |
|
| 9 |
# Load the trained machine learning model
|
| 10 |
+
model_path = "super_kart_model_v1_0.joblib"
|
| 11 |
+
|
| 12 |
+
try:
|
| 13 |
+
model = joblib.load(model_path)
|
| 14 |
+
print(f"Model loaded successfully from {model_path}")
|
| 15 |
+
except FileNotFoundError:
|
| 16 |
+
raise FileNotFoundError(f"Model file not found at {model_path}. Ensure it's uploaded to the repo root.")
|
| 17 |
|
| 18 |
# Expected feature names from the model (adjust if your training columns differ)
|
| 19 |
EXPECTED_COLUMNS = [
|