Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -79,7 +79,7 @@ input_data = pd.DataFrame([{
|
|
| 79 |
if st.button("Predict"):
|
| 80 |
response = requests.post("https://nlauchande-ForecastBackend2.hf.space/v1/predict", json=input_data.to_dict(orient='records')[0]) # Send data to Flask API
|
| 81 |
if response.status_code == 200:
|
| 82 |
-
prediction = response.json()['Predicted
|
| 83 |
st.success(f"Predicted Sales: {prediction}")
|
| 84 |
else:
|
| 85 |
st.error("Error making prediction.")
|
|
|
|
| 79 |
if st.button("Predict"):
|
| 80 |
response = requests.post("https://nlauchande-ForecastBackend2.hf.space/v1/predict", json=input_data.to_dict(orient='records')[0]) # Send data to Flask API
|
| 81 |
if response.status_code == 200:
|
| 82 |
+
prediction = response.json()['Predicted Price (in dollars)']
|
| 83 |
st.success(f"Predicted Sales: {prediction}")
|
| 84 |
else:
|
| 85 |
st.error("Error making prediction.")
|