Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -45,8 +45,7 @@ input_data = pd.DataFrame([{
|
|
| 45 |
if st.button("Predict"):
|
| 46 |
response = requests.post("https://anusubash-superkartmodelbackend.hf.space/v1/sales", json=input_data.to_dict(orient='records')[0]) # Send data to Flask API
|
| 47 |
if response.status_code == 200:
|
| 48 |
-
|
| 49 |
-
prediction = result.get('Predicted Product Sales')
|
| 50 |
if prediction is not None:
|
| 51 |
st.success(f"Predicted Product Sales (in dollars): {prediction}")
|
| 52 |
else:
|
|
|
|
| 45 |
if st.button("Predict"):
|
| 46 |
response = requests.post("https://anusubash-superkartmodelbackend.hf.space/v1/sales", json=input_data.to_dict(orient='records')[0]) # Send data to Flask API
|
| 47 |
if response.status_code == 200:
|
| 48 |
+
prediction = response.json()['Predicted Price (in dollars)']
|
|
|
|
| 49 |
if prediction is not None:
|
| 50 |
st.success(f"Predicted Product Sales (in dollars): {prediction}")
|
| 51 |
else:
|