Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -5,13 +5,14 @@ from flask import Flask, request, jsonify
|
|
| 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 |
# Define a route for the home page
|
| 8 |
-
@sapp.get('/')
|
| 9 |
-
def home():
|
| 10 |
-
|
| 11 |
|
| 12 |
|
| 13 |
# Define an endpoint
|
| 14 |
-
@app.post('/v1/price')
|
|
|
|
| 15 |
def predict_price():
|
| 16 |
# Get JSON data from the request
|
| 17 |
input_json = request.get_json()
|
|
|
|
| 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 |
# Define a route for the home page
|
| 8 |
+
# @sapp.get('/')
|
| 9 |
+
# def home():
|
| 10 |
+
# return "Welcome to the Supermarket Product Price Predictor!"
|
| 11 |
|
| 12 |
|
| 13 |
# Define an endpoint
|
| 14 |
+
##@app.post('/v1/price')
|
| 15 |
+
@sapp.get('/')
|
| 16 |
def predict_price():
|
| 17 |
# Get JSON data from the request
|
| 18 |
input_json = request.get_json()
|