Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -51,7 +51,7 @@ uploaded_file = st.file_uploader("Upload CSV file for batch prediction", type=["
|
|
| 51 |
# Make batch prediction when the "Predict Batch" button is clicked
|
| 52 |
if uploaded_file is not None:
|
| 53 |
if st.button("Predict Batch"):
|
| 54 |
-
response = requests.post("https://
|
| 55 |
if response.status_code == 200:
|
| 56 |
predictions = response.json()
|
| 57 |
st.success("Batch predictions completed!")
|
|
|
|
| 51 |
# Make batch prediction when the "Predict Batch" button is clicked
|
| 52 |
if uploaded_file is not None:
|
| 53 |
if st.button("Predict Batch"):
|
| 54 |
+
response = requests.post("https://abhichar-AirBNB-345.hf.space/v1/rentalbatch", files={"file": uploaded_file}) # Send file to Flask API
|
| 55 |
if response.status_code == 200:
|
| 56 |
predictions = response.json()
|
| 57 |
st.success("Batch predictions completed!")
|