praneeth232 commited on
Commit
73ec6a7
·
verified ·
1 Parent(s): 697f879

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -29,7 +29,7 @@ customer_data = {
29
  }
30
 
31
  if st.button("Predict", type='primary'):
32
- response = requests.post("https://localhost:8000/customer", json=customer_data)
33
  if response.status_code == 200:
34
  result = response.json()
35
  churn_prediction = result["Churn expected?"] # Extract only the value
@@ -42,7 +42,7 @@ st.subheader("Batch Prediction")
42
  file = st.file_uploader("Upload CSV file", type=["csv"])
43
  if file is not None:
44
  if st.button("Predict for Batch", type='primary'):
45
- response = requests.post("https://localhost:8000/customerbatch", files={"file": file})
46
  if response.status_code == 200:
47
  result = response.json()
48
  st.header("Batch Prediction Results")
 
29
  }
30
 
31
  if st.button("Predict", type='primary'):
32
+ response = requests.post("http://localhost:8000/customer", json=customer_data)
33
  if response.status_code == 200:
34
  result = response.json()
35
  churn_prediction = result["Churn expected?"] # Extract only the value
 
42
  file = st.file_uploader("Upload CSV file", type=["csv"])
43
  if file is not None:
44
  if st.button("Predict for Batch", type='primary'):
45
+ response = requests.post("http://localhost:8000/customerbatch", files={"file": file})
46
  if response.status_code == 200:
47
  result = response.json()
48
  st.header("Batch Prediction Results")