Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -64,7 +64,7 @@ input_data_2 = {
|
|
| 64 |
"Store_Type":"Supermarket Type1",
|
| 65 |
}
|
| 66 |
input_data_1 = input_data_1.to_dict(orient='records')[0]
|
| 67 |
-
st.write("
|
| 68 |
# Make prediction when the "Predict" button is clicked
|
| 69 |
if st.button("Predict"):
|
| 70 |
response = requests.post("https://karora1804-StoreTotalSalesPredictionBackend.hf.space/v1/storeSales", json=input_data_2) # Send data to Flask API
|
|
@@ -73,6 +73,8 @@ if st.button("Predict"):
|
|
| 73 |
st.success(f"Predicted Store Total Sales: {prediction}")
|
| 74 |
else:
|
| 75 |
st.error("Error making prediction.")
|
|
|
|
|
|
|
| 76 |
|
| 77 |
# Section for batch prediction
|
| 78 |
st.subheader("Batch Prediction")
|
|
|
|
| 64 |
"Store_Type":"Supermarket Type1",
|
| 65 |
}
|
| 66 |
input_data_1 = input_data_1.to_dict(orient='records')[0]
|
| 67 |
+
st.write("input_data_2:", input_data_2)
|
| 68 |
# Make prediction when the "Predict" button is clicked
|
| 69 |
if st.button("Predict"):
|
| 70 |
response = requests.post("https://karora1804-StoreTotalSalesPredictionBackend.hf.space/v1/storeSales", json=input_data_2) # Send data to Flask API
|
|
|
|
| 73 |
st.success(f"Predicted Store Total Sales: {prediction}")
|
| 74 |
else:
|
| 75 |
st.error("Error making prediction.")
|
| 76 |
+
st.write(response.status_code)
|
| 77 |
+
st.write(response.text)
|
| 78 |
|
| 79 |
# Section for batch prediction
|
| 80 |
st.subheader("Batch Prediction")
|