rama64palle commited on
Commit
4bbd47c
·
verified ·
1 Parent(s): 0f6e221

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. Dockerfile +1 -1
  2. app.py +2 -2
Dockerfile CHANGED
@@ -13,4 +13,4 @@ RUN pip install --no-cache-dir --upgrade -r requirements.txt
13
  # - `-w 4`: Uses 4 worker processes for handling requests
14
  # - `-b 0.0.0.0:7860`: Binds the server to port 7860 on all network interfaces
15
  # - `app:app`: Runs the Flask app (assuming `app.py` contains the Flask instance named `app`)
16
- CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "app:rental_price_predictor_api"]
 
13
  # - `-w 4`: Uses 4 worker processes for handling requests
14
  # - `-b 0.0.0.0:7860`: Binds the server to port 7860 on all network interfaces
15
  # - `app:app`: Runs the Flask app (assuming `app.py` contains the Flask instance named `app`)
16
+ CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "app:superkart_predictor_api"]
app.py CHANGED
@@ -8,7 +8,7 @@ from flask import Flask, request, jsonify # For creating the Flask API
8
  superkart_predictor_api = Flask("SuperKart sales Predictor")
9
 
10
  # Load the trained machine learning model
11
- model = joblib.load("Super_Kart_predication_v1_0.joblib")
12
 
13
  # Define a route for the home page (GET request)
14
  @superkart_predictor_api.get('/')
@@ -17,7 +17,7 @@ def home():
17
  This function handles GET requests to the root URL ('/') of the API.
18
  It returns a simple welcome message.
19
  """
20
- return "Welcome to the Airbnb Rental Price Prediction API!"
21
 
22
  # Define an endpoint for single property prediction (POST request)
23
  @superkart_predictor_api.post('/v1/sales')
 
8
  superkart_predictor_api = Flask("SuperKart sales Predictor")
9
 
10
  # Load the trained machine learning model
11
+ model = joblib.load("deployment_files/Super_Kart_predication_v1_0.joblib")
12
 
13
  # Define a route for the home page (GET request)
14
  @superkart_predictor_api.get('/')
 
17
  This function handles GET requests to the root URL ('/') of the API.
18
  It returns a simple welcome message.
19
  """
20
+ return "Welcome to the SuperKart slares Prediction API!"
21
 
22
  # Define an endpoint for single property prediction (POST request)
23
  @superkart_predictor_api.post('/v1/sales')