memopenaws commited on
Commit
496be1a
·
verified ·
1 Parent(s): 320fb3f

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -9,7 +9,9 @@ from flask import Flask, request, jsonify # For creating the Flask API
9
  superkart_api = Flask("superkart_api") #Complete the code to define the name of the app
10
 
11
  # Load the trained churn prediction model
12
- model = joblib.load("backend_files/random_forest.joblib") #Complete the code to define the location of the serialized model
 
 
13
 
14
  # Define a route for the home page
15
  @superkart_api.get('/')
@@ -45,8 +47,6 @@ def predict_sales():
45
  # Return the prediction as a JSON response
46
  return jsonify({'Sales': prediction})
47
 
48
- # Adding a comment to force a file change detection - this is a test
49
- # You can remove this comment later if the upload works
50
 
51
  # Run the Flask app in debug mode
52
  if __name__ == '__main__':
 
9
  superkart_api = Flask("superkart_api") #Complete the code to define the name of the app
10
 
11
  # Load the trained churn prediction model
12
+ model = joblib.load("/app/random_forest.joblib") #Corrected path for loading the model
13
+ # Adding a comment to force a file change detection - this is a test
14
+ # You can remove this comment later if the upload works
15
 
16
  # Define a route for the home page
17
  @superkart_api.get('/')
 
47
  # Return the prediction as a JSON response
48
  return jsonify({'Sales': prediction})
49
 
 
 
50
 
51
  # Run the Flask app in debug mode
52
  if __name__ == '__main__':