deepacsr commited on
Commit
73932dd
·
verified ·
1 Parent(s): ea20b75

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -19,6 +19,12 @@ def home():
19
  This function handles GET requests to the root URL ('/') of the API.
20
  The function displays simple welcome message.
21
  """
 
 
 
 
 
 
22
  return "Welcome to the SuperKart Product Sales Prediction API!"
23
 
24
  # Define an endpoint for single Product Sales prediction (POST request)
@@ -68,11 +74,6 @@ def predict_sales_batch():
68
  and returns the predicted product sales prices as a dictionary in the JSON response.
69
  """
70
 
71
- handler = logging.FileHandler('app.log')
72
- app.logger.addHandler(handler)
73
- app.logger.setLevel(logging.INFO)
74
- app.logger.info('Request received')
75
-
76
  # Get the uploaded CSV file from the request
77
  file = request.files['file']
78
 
 
19
  This function handles GET requests to the root URL ('/') of the API.
20
  The function displays simple welcome message.
21
  """
22
+
23
+ handler = logging.FileHandler('app.log')
24
+ app.logger.addHandler(handler)
25
+ app.logger.setLevel(logging.INFO)
26
+ app.logger.info('Request received')
27
+
28
  return "Welcome to the SuperKart Product Sales Prediction API!"
29
 
30
  # Define an endpoint for single Product Sales prediction (POST request)
 
74
  and returns the predicted product sales prices as a dictionary in the JSON response.
75
  """
76
 
 
 
 
 
 
77
  # Get the uploaded CSV file from the request
78
  file = request.files['file']
79