Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -46,19 +46,19 @@ if st.button("Predict"):
|
|
| 46 |
else:
|
| 47 |
st.error("Error making prediction.")
|
| 48 |
|
| 49 |
-
# Section for batch prediction
|
| 50 |
-
st.subheader("Batch Prediction")
|
| 51 |
|
| 52 |
-
# Allow users to upload a CSV file for batch prediction
|
| 53 |
-
uploaded_file = st.file_uploader("Upload CSV file for batch prediction", type=["csv"])
|
| 54 |
|
| 55 |
-
# Make batch prediction when the "Predict Batch" button is clicked
|
| 56 |
-
if uploaded_file is not None:
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
|
|
|
| 46 |
else:
|
| 47 |
st.error("Error making prediction.")
|
| 48 |
|
| 49 |
+
# # Section for batch prediction
|
| 50 |
+
# st.subheader("Batch Prediction")
|
| 51 |
|
| 52 |
+
# # Allow users to upload a CSV file for batch prediction
|
| 53 |
+
# uploaded_file = st.file_uploader("Upload CSV file for batch prediction", type=["csv"])
|
| 54 |
|
| 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://pragmat-SalesRevenuePredictionBackend.hf.space/v1/revenuebatch", 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!")
|
| 62 |
+
# st.write(predictions) # Display the predictions
|
| 63 |
+
# else:
|
| 64 |
+
# st.error("Error making batch prediction.")
|