Hugo014 commited on
Commit
c04d632
·
verified ·
1 Parent(s): af2151f

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +7 -1
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
- model = joblib.load("backend_files/super_kart_model_v1_0.joblib")
 
 
 
 
 
 
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 = [