Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -35,7 +35,7 @@ if st.button("Predict", type='primary'):
|
|
| 35 |
response = requests.post("https://rda9527-deployment-test-v2.hf.space/v1/customer", json=customer_data)
|
| 36 |
if response.status_code == 200:
|
| 37 |
result = response.json()
|
| 38 |
-
churn_prediction = result["
|
| 39 |
st.write(f"Based on the information provided, the customer with ID {CustomerID} is likely to {churn_prediction}.")
|
| 40 |
else:
|
| 41 |
st.error("Error in API request")
|
|
|
|
| 35 |
response = requests.post("https://rda9527-deployment-test-v2.hf.space/v1/customer", json=customer_data)
|
| 36 |
if response.status_code == 200:
|
| 37 |
result = response.json()
|
| 38 |
+
churn_prediction = result["Prediction"] # Extract only the value
|
| 39 |
st.write(f"Based on the information provided, the customer with ID {CustomerID} is likely to {churn_prediction}.")
|
| 40 |
else:
|
| 41 |
st.error("Error in API request")
|