Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,7 +26,7 @@ if st.button("Predict", type='primary'):
|
|
| 26 |
response = requests.post("https://rahulg1987-app-backend.hf.space/v1/totalsales", json=product_data)
|
| 27 |
if response.status_code == 200:
|
| 28 |
result = response.json()
|
| 29 |
-
prediction = result["
|
| 30 |
st.write(f"Based on the product information provided, The sales price will be {prediction}.")
|
| 31 |
else:
|
| 32 |
st.error(response.status_code)
|
|
|
|
| 26 |
response = requests.post("https://rahulg1987-app-backend.hf.space/v1/totalsales", json=product_data)
|
| 27 |
if response.status_code == 200:
|
| 28 |
result = response.json()
|
| 29 |
+
prediction = result["predicted_sales"] # Extract only the value
|
| 30 |
st.write(f"Based on the product information provided, The sales price will be {prediction}.")
|
| 31 |
else:
|
| 32 |
st.error(response.status_code)
|