Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -4,6 +4,7 @@ import requests
|
|
| 4 |
|
| 5 |
# Set the title of the Streamlit app
|
| 6 |
st.title('SuperKart Product Store Sales Total Prediction')
|
|
|
|
| 7 |
|
| 8 |
# Section for online prediction
|
| 9 |
st.subheader('Online Prediction')
|
|
@@ -45,7 +46,7 @@ input_data = pd.DataFrame([{
|
|
| 45 |
if st.button('Predict'):
|
| 46 |
# Send the input data to the backend API for prediction
|
| 47 |
# Make sure the URL is correct for your Hugging Face Space backend
|
| 48 |
-
response = requests.post("https://rommat/
|
| 49 |
if response.status_code == 200:
|
| 50 |
prediction = response.json()['Predicted Product Store Sales Total (in dollars)']
|
| 51 |
st.success(f'Predicted Product Store Sales Total Price (in dollars): {prediction}')
|
|
|
|
| 4 |
|
| 5 |
# Set the title of the Streamlit app
|
| 6 |
st.title('SuperKart Product Store Sales Total Prediction')
|
| 7 |
+
st.write("This tool predicts store sales based on their products details")
|
| 8 |
|
| 9 |
# Section for online prediction
|
| 10 |
st.subheader('Online Prediction')
|
|
|
|
| 46 |
if st.button('Predict'):
|
| 47 |
# Send the input data to the backend API for prediction
|
| 48 |
# Make sure the URL is correct for your Hugging Face Space backend
|
| 49 |
+
response = requests.post("https://rommat/storesalestotalpredictionbackend.hf.space/v1/productstoresalestotal", json=input_data.to_dict(orient='records')[0]) # Send data to Flask API
|
| 50 |
if response.status_code == 200:
|
| 51 |
prediction = response.json()['Predicted Product Store Sales Total (in dollars)']
|
| 52 |
st.success(f'Predicted Product Store Sales Total Price (in dollars): {prediction}')
|