Spaces:
Runtime error
Runtime error
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -55,7 +55,7 @@ uploaded_file = st.file_uploader("Upload CSV file for batch prediction", type=["
|
|
| 55 |
# Make batch prediction when the "Predict Batch" button is clicked
|
| 56 |
if uploaded_file is not None:
|
| 57 |
if st.button("Predict Batch"):
|
| 58 |
-
response = requests.post("https://akarora93‑SalesForecastPredictionBackend.hf.space/v1/
|
| 59 |
if response.status_code == 200:
|
| 60 |
predictions = response.json()
|
| 61 |
st.success("Batch predictions completed!")
|
|
|
|
| 55 |
# Make batch prediction when the "Predict Batch" button is clicked
|
| 56 |
if uploaded_file is not None:
|
| 57 |
if st.button("Predict Batch"):
|
| 58 |
+
response = requests.post("https://akarora93‑SalesForecastPredictionBackend.hf.space/v1/productbatch", files={"file": uploaded_file}) # Send file to Flask API
|
| 59 |
if response.status_code == 200:
|
| 60 |
predictions = response.json()
|
| 61 |
st.success("Batch predictions completed!")
|