sga123 commited on
Commit
8dc82de
·
verified ·
1 Parent(s): b7fab40

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. .gitattributes +1 -0
  2. app.py +3 -2
  3. predict_product_price_v1_0.json +3 -0
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ predict_product_price_v1_0.json filter=lfs diff=lfs merge=lfs -text
app.py CHANGED
@@ -1,10 +1,11 @@
1
  import joblib
2
  import pandas as pd
 
3
  from flask import Flask, request, jsonify
4
  # Initialize Flask app
5
  app = Flask("Supermarket Product Price Predictor")
6
  ###model = joblib.load("D:/Machine_Learning_Neural_Nets_Course/SuperKart/backend_files/predict_product_price_v1_0.joblib")
7
- model = joblib.load("predict_product_price_v1_0.joblib")
8
  # Define a route for the home page
9
  # @sapp.get('/')
10
  # def home():
@@ -17,6 +18,6 @@ def predict_price():
17
  # Convert the extracted data into a DataFrame
18
  input_data = pd.DataFrame([input_json])
19
  # Make a churn prediction using the trained model
20
- prediction = model.predict(input_data)
21
  # Return the prediction as a JSON response
22
  return jsonify({'Price': prediction})
 
1
  import joblib
2
  import pandas as pd
3
+ import xgboost as xgb
4
  from flask import Flask, request, jsonify
5
  # Initialize Flask app
6
  app = Flask("Supermarket Product Price Predictor")
7
  ###model = joblib.load("D:/Machine_Learning_Neural_Nets_Course/SuperKart/backend_files/predict_product_price_v1_0.joblib")
8
+ loaded_model = joblib.load("predict_product_price_v1_0.joblib")
9
  # Define a route for the home page
10
  # @sapp.get('/')
11
  # def home():
 
18
  # Convert the extracted data into a DataFrame
19
  input_data = pd.DataFrame([input_json])
20
  # Make a churn prediction using the trained model
21
+ prediction = loaded_model.predict(input_data)
22
  # Return the prediction as a JSON response
23
  return jsonify({'Price': prediction})
predict_product_price_v1_0.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5e81a78201a5b9d52595fd1013c306a33d76bce92c09f96c31512b03921880bb
3
+ size 11194810