A
commited on
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -56,17 +56,6 @@ st.subheader("Batch Prediction")
|
|
| 56 |
# Allow users to upload a CSV file for batch prediction
|
| 57 |
uploaded_file = st.file_uploader("Upload CSV file for batch prediction", type=["csv"])
|
| 58 |
|
| 59 |
-
# Make batch prediction when the "Predict Batch" button is clicked
|
| 60 |
-
# if uploaded_file is not None:
|
| 61 |
-
# if st.button("Predict Batch"):
|
| 62 |
-
# response = requests.post("https://Swetha2031-SuperKartSalesPredictionBackend.hf.space/v1/salesbatch", files={"file": uploaded_file})
|
| 63 |
-
# if response.status_code == 200:
|
| 64 |
-
# predictions = response.json()['Predicted Sales (₹)']
|
| 65 |
-
|
| 66 |
-
# st.success("Batch predictions completed!")
|
| 67 |
-
# st.write(predictions)
|
| 68 |
-
# else:
|
| 69 |
-
# st.error("Error making batch prediction.")
|
| 70 |
|
| 71 |
if st.button("Predict Batch"):
|
| 72 |
response = requests.post("https://Swetha2031-SuperKartSalesPredictionBackend.hf.space/v1/salesbatch", files={"file": uploaded_file})
|
|
|
|
| 56 |
# Allow users to upload a CSV file for batch prediction
|
| 57 |
uploaded_file = st.file_uploader("Upload CSV file for batch prediction", type=["csv"])
|
| 58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
|
| 60 |
if st.button("Predict Batch"):
|
| 61 |
response = requests.post("https://Swetha2031-SuperKartSalesPredictionBackend.hf.space/v1/salesbatch", files={"file": uploaded_file})
|