MainiSandeep1987 commited on
Commit
da1e5ea
·
verified ·
1 Parent(s): 5445af3

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. Dockerfile +0 -7
  2. app.py +2 -2
Dockerfile CHANGED
@@ -1,10 +1,3 @@
1
- # FROM python:3.9-slim
2
- # WORKDIR /app
3
- # COPY . .
4
- # COPY requirements.txt .
5
- # COPY app.py .
6
- # RUN pip install --no-cache-dir --upgrade -r requirements.txt
7
- # CMD ["streamlit", "run", "app.py", "server.address=0.0.0.0", "server.port=8501"]
8
  FROM python:3.9-slim
9
  WORKDIR /app
10
  COPY requirements.txt .
 
 
 
 
 
 
 
 
1
  FROM python:3.9-slim
2
  WORKDIR /app
3
  COPY requirements.txt .
app.py CHANGED
@@ -35,7 +35,7 @@ customer_data = {
35
 
36
 
37
  if st.button("Predict", type='primary'):
38
- response = requests.post("https://MainiSandeep1987-FlaskAPITelecomChurnPrediction.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://MainiSandeep1987-FlaskAPITelecomChurnPrediction.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://MainiSandeep1987-BackEndFlaskAPITelecomChurnPrediction.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://MainiSandeep1987-BackEndFlaskAPITelecomChurnPrediction.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")