kjdeka commited on
Commit
9aa6a2b
·
verified ·
1 Parent(s): 88da4ee

Upload folder using huggingface_hub

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