harasar commited on
Commit
0e26953
·
verified ·
1 Parent(s): 8a3c08d

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -35,7 +35,7 @@ customer_data = {
35
 
36
 
37
  if st.button("Predict", type='primary'):
38
- response = requests.post("https://harasar-CustomerChurnFrontend.hf.space/v1/customer", json=customer_data) # enter user name and space name before running the cell
39
  if response.status_code == 200:
40
  result = response.json()
41
  churn_prediction = result["Prediction"] # Extract only the value
@@ -49,7 +49,7 @@ st.subheader("Batch Prediction")
49
  file = st.file_uploader("Upload CSV file", type=["csv"])
50
  if file is not None:
51
  if st.button("Predict for Batch", type='primary'):
52
- response = requests.post("https://harasar-CustomerChurnFrontend.hf.space/v1/customerbatch", files={"file": file}) # enter user name and space name before running the cell
53
  if response.status_code == 200:
54
  result = response.json()
55
  st.header("Batch Prediction Results")
 
35
 
36
 
37
  if st.button("Predict", type='primary'):
38
+ response = requests.post("https://harasar-CustomerChurnBackend.hf.space/v1/customer", json=customer_data) # enter user name and space name before running the cell
39
  if response.status_code == 200:
40
  result = response.json()
41
  churn_prediction = result["Prediction"] # Extract only the value
 
49
  file = st.file_uploader("Upload CSV file", type=["csv"])
50
  if file is not None:
51
  if st.button("Predict for Batch", type='primary'):
52
+ response = requests.post("https://harasar-CustomerChurnBackend.hf.space/v1/customerbatch", files={"file": file}) # enter user name and space name before running the cell
53
  if response.status_code == 200:
54
  result = response.json()
55
  st.header("Batch Prediction Results")