Upload folder using huggingface_hub
Browse files31 unmodified lines323334353637387 unmodified lines4647484950515231 unmodified lines}if st.button("Predict", type='primary'):response = requests.post("https://creativitysupreme-Churn_Prediction.hf.space/v1/customer", json=customer_data) # enter user name and space name before running the cellif response.status_code == 200:result = response.json()churn_prediction = result["Prediction"] # Extract only the value7 unmodified linesfile = st.file_uploader("Upload CSV file", type=["csv"])if file is not None:if st.button("Predict for Batch", type='primary'):response = requests.post("https://creativitysupreme-Churn_Prediction.hf.space/v1/customerbatch", files={"file": file}) # enter user name and space name before running the cellif response.status_code == 200:result = response.json()st.header("Batch Prediction Results")31 unmodified lines323334353637387 unmodified lines4647484950515231 unmodified lines}if st.button("Predict", type='primary'):response = requests.post("https://creativitysupreme-churn-prediction.hf.space/v1/customer", json=customer_data) # enter user name and space name before running the cellif response.status_code == 200:result = response.json()churn_prediction = result["Prediction"] # Extract only the value7 unmodified linesfile = st.file_uploader("Upload CSV file", type=["csv"])if file is not None:if st.button("Predict for Batch", type='primary'):response = requests.post("https://creativitysupreme-churn-prediction.hf.space/v1/customerbatch", files={"file": file}) # enter user name and space name before running the cellif response.status_code == 200:result = response.json()st.header("Batch Prediction Results")
app.py+2-2