hareeshkumarkb commited on
Commit
e677a5a
·
verified ·
1 Parent(s): b019b3c

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -7,7 +7,7 @@ import json
7
  # Define the URL of your deployed backend API
8
  # Replace with the actual URL of your Hugging Face Space endpoint
9
  # The endpoint will typically be your_space_url/predict
10
- BACKEND_API_URL = "https://huggingface.co/spaces/hareeshkumarkn/hareesh539/predict"
11
 
12
  st.title("SuperKart Sales Prediction")
13
 
@@ -74,7 +74,7 @@ if st.button("Predict Sales"):
74
  try:
75
  # Send the data to the backend API
76
  # Sending as a list containing the dictionary to potentially handle batch predictions in the future
77
- response = requests.post(https://huggingface.co/spaces/hareeshkumarkn/hareesh539, json=[input_data])
78
 
79
  if response.status_code == 200:
80
  predictions = response.json().get('predictions')
 
7
  # Define the URL of your deployed backend API
8
  # Replace with the actual URL of your Hugging Face Space endpoint
9
  # The endpoint will typically be your_space_url/predict
10
+ BACKEND_API_URL = "https://huggingface.co/spaces/hareeshkumarkn/hareesh539/predict" # Added quotes
11
 
12
  st.title("SuperKart Sales Prediction")
13
 
 
74
  try:
75
  # Send the data to the backend API
76
  # Sending as a list containing the dictionary to potentially handle batch predictions in the future
77
+ response = requests.post(BACKEND_API_URL, json=[input_data])
78
 
79
  if response.status_code == 200:
80
  predictions = response.json().get('predictions')