Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ import pandas as pd
|
|
| 5 |
st.title("Customer Churn Prediction")
|
| 6 |
|
| 7 |
# Batch Prediction
|
| 8 |
-
st.subheader("Online Prediction")
|
| 9 |
|
| 10 |
# Input fields for customer data
|
| 11 |
CustomerID = st.number_input("Customer ID", min_value=10000000, max_value=99999999)
|
|
@@ -40,16 +40,16 @@ if st.button("Predict", type='primary'):
|
|
| 40 |
else:
|
| 41 |
st.error("Error in API request")
|
| 42 |
|
| 43 |
-
# Batch Prediction
|
| 44 |
-
st.subheader("Batch Prediction")
|
| 45 |
|
| 46 |
-
file = st.file_uploader("Upload CSV file", type=["csv"])
|
| 47 |
-
if file is not None:
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
|
|
|
| 5 |
st.title("Customer Churn Prediction")
|
| 6 |
|
| 7 |
# Batch Prediction
|
| 8 |
+
# st.subheader("Online Prediction")
|
| 9 |
|
| 10 |
# Input fields for customer data
|
| 11 |
CustomerID = st.number_input("Customer ID", min_value=10000000, max_value=99999999)
|
|
|
|
| 40 |
else:
|
| 41 |
st.error("Error in API request")
|
| 42 |
|
| 43 |
+
# # Batch Prediction
|
| 44 |
+
# st.subheader("Batch Prediction")
|
| 45 |
|
| 46 |
+
# file = st.file_uploader("Upload CSV file", type=["csv"])
|
| 47 |
+
# if file is not None:
|
| 48 |
+
# if st.button("Predict for Batch", type='primary'):
|
| 49 |
+
# response = requests.post("https://rda9527-deployment-test-v2.hf.space/v1/customerbatch", files={"file": file})
|
| 50 |
+
# if response.status_code == 200:
|
| 51 |
+
# result = response.json()
|
| 52 |
+
# st.header("Batch Prediction Results")
|
| 53 |
+
# st.write(result)
|
| 54 |
+
# else:
|
| 55 |
+
# st.error("Error in API request")
|