Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -32,7 +32,13 @@ customer_data = {
|
|
| 32 |
}
|
| 33 |
|
| 34 |
if st.button("Predict", type='primary'):
|
|
|
|
|
|
|
| 35 |
response = requests.post("https://subhash33-flask_churn_backend.hf.space/v1/customer", json=customer_data) # enter user name and space name before running the cell
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
if response.status_code == 200:
|
| 37 |
result = response.json()
|
| 38 |
churn_prediction = result["Prediction"] # Extract only the value
|
|
|
|
| 32 |
}
|
| 33 |
|
| 34 |
if st.button("Predict", type='primary'):
|
| 35 |
+
st.write(customer_data)
|
| 36 |
+
|
| 37 |
response = requests.post("https://subhash33-flask_churn_backend.hf.space/v1/customer", json=customer_data) # enter user name and space name before running the cell
|
| 38 |
+
|
| 39 |
+
st.write("Status Code:", response.status_code)
|
| 40 |
+
st.write("Raw Text:", response.text)
|
| 41 |
+
|
| 42 |
if response.status_code == 200:
|
| 43 |
result = response.json()
|
| 44 |
churn_prediction = result["Prediction"] # Extract only the value
|