Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -75,6 +75,9 @@ if st.button("Predict"):
|
|
| 75 |
# Send the input data to the Flask API for prediction
|
| 76 |
response = requests.post("https://anithajk-SuperKartDecesionMakingModelBackend.hf.space/v1/productsale", json=input_data.to_dict(orient='records')[0]) # Send data to Flask API
|
| 77 |
if response.status_code == 200:
|
|
|
|
|
|
|
|
|
|
| 78 |
prediction = response.json()['Predicted Revenue (in dollars)']
|
| 79 |
st.success(f"Predicted Revenue (in dollars): {prediction}")
|
| 80 |
else:
|
|
|
|
| 75 |
# Send the input data to the Flask API for prediction
|
| 76 |
response = requests.post("https://anithajk-SuperKartDecesionMakingModelBackend.hf.space/v1/productsale", json=input_data.to_dict(orient='records')[0]) # Send data to Flask API
|
| 77 |
if response.status_code == 200:
|
| 78 |
+
print(f"result {response.json()}")
|
| 79 |
+
data = response.json()
|
| 80 |
+
print(data.keys())
|
| 81 |
prediction = response.json()['Predicted Revenue (in dollars)']
|
| 82 |
st.success(f"Predicted Revenue (in dollars): {prediction}")
|
| 83 |
else:
|