Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -36,7 +36,7 @@ if st.button("Predict", type='primary'):
|
|
| 36 |
response = requests.post("https://sp1505-frontend.hf.space/v1/customer", json=customer_data) # enter user name and space name before running the cell
|
| 37 |
if response.status_code == 200:
|
| 38 |
result = response.json()
|
| 39 |
-
|
| 40 |
st.write(f"Based on the information provided, the customer with ID {CustomerID} is likely to {churn_prediction}.")
|
| 41 |
else:
|
| 42 |
st.error("Error in API request")
|
|
|
|
| 36 |
response = requests.post("https://sp1505-frontend.hf.space/v1/customer", json=customer_data) # enter user name and space name before running the cell
|
| 37 |
if response.status_code == 200:
|
| 38 |
result = response.json()
|
| 39 |
+
sales_prediction = result["Predicted_Sales"] # Extract only the value
|
| 40 |
st.write(f"Based on the information provided, the customer with ID {CustomerID} is likely to {churn_prediction}.")
|
| 41 |
else:
|
| 42 |
st.error("Error in API request")
|