Spaces:
Runtime error
Runtime error
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -46,7 +46,7 @@ input_df = pd.DataFrame([input_dict])
|
|
| 46 |
|
| 47 |
# Make prediction when the "Predict" button is clicked
|
| 48 |
if st.button("Predict Sales"):
|
| 49 |
-
response = requests.post("https://dutta2arnab-SuperKartSalesPredictionBackend.hf.space/v1/sales_forecast", json=
|
| 50 |
if response.status_code == 200:
|
| 51 |
prediction = response.json()['Predicted Price (in dollars)']
|
| 52 |
st.success(f"Predicted Sales price (in dollars): {prediction}")
|
|
|
|
| 46 |
|
| 47 |
# Make prediction when the "Predict" button is clicked
|
| 48 |
if st.button("Predict Sales"):
|
| 49 |
+
response = requests.post("https://dutta2arnab-SuperKartSalesPredictionBackend.hf.space/v1/sales_forecast", json=input_df.to_dict(orient='records')[0]) # Send data to Flask API
|
| 50 |
if response.status_code == 200:
|
| 51 |
prediction = response.json()['Predicted Price (in dollars)']
|
| 52 |
st.success(f"Predicted Sales price (in dollars): {prediction}")
|