RDA9527 commited on
Commit
570a737
·
verified ·
1 Parent(s): ebeca8b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -13
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
- 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")
 
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")