Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -37,7 +37,7 @@ input_data = pd.DataFrame([{
|
|
| 37 |
|
| 38 |
# Make prediction when the "Predict" button is clicked
|
| 39 |
if st.button("Predict"):
|
| 40 |
-
response = requests.post("https://
|
| 41 |
if response.status_code == 200:
|
| 42 |
prediction = response.json()['Predicted Sales (in dollars)']
|
| 43 |
st.success(f"Predicted Sales (in dollars): {prediction}")
|
|
|
|
| 37 |
|
| 38 |
# Make prediction when the "Predict" button is clicked
|
| 39 |
if st.button("Predict"):
|
| 40 |
+
response = requests.post("https://superkartpredictionbackend.hf.space/v1/sales", json=input_data.to_dict(orient='records')[0]) # Send data to Flask API
|
| 41 |
if response.status_code == 200:
|
| 42 |
prediction = response.json()['Predicted Sales (in dollars)']
|
| 43 |
st.success(f"Predicted Sales (in dollars): {prediction}")
|