Anil28053 commited on
Commit
a64d62c
·
verified ·
1 Parent(s): e99ae05

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. app.py +3 -3
  2. requirements.txt +0 -2
app.py CHANGED
@@ -52,13 +52,13 @@ def predict_sales_batch():
52
  input_data = pd.read_csv(file)
53
 
54
  # Make predictions for the batch data and convert raw predictions into a readable format
55
- predictions = [model.predict(input_data.drop("Product_Id",axis=1)).tolist()]
56
 
57
  prod_id_list = input_data.Product_Id.values.tolist()
58
  output_dict = dict(zip(prod_id_list, predictions))
59
 
60
- return output_dict
61
 
62
  # Run the Flask app in debug mode
63
  if __name__ == '__main__':
64
- app.run(debug=True)
 
52
  input_data = pd.read_csv(file)
53
 
54
  # Make predictions for the batch data and convert raw predictions into a readable format
55
+ predictions = model.predict(input_data.drop("Product_Id",axis=1)).tolist()
56
 
57
  prod_id_list = input_data.Product_Id.values.tolist()
58
  output_dict = dict(zip(prod_id_list, predictions))
59
 
60
+ return jsonify(output_dict)
61
 
62
  # Run the Flask app in debug mode
63
  if __name__ == '__main__':
64
+ sales_forecast_api.run(debug=True, host="0.0.0.0", port=7860)
requirements.txt CHANGED
@@ -7,5 +7,3 @@ Werkzeug==2.2.2
7
  flask==2.2.2
8
  gunicorn==20.1.0
9
  requests==2.28.1
10
- uvicorn[standard]
11
- streamlit==1.43.2
 
7
  flask==2.2.2
8
  gunicorn==20.1.0
9
  requests==2.28.1