Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -41,7 +41,7 @@ input_data = pd.DataFrame([{
|
|
| 41 |
}])
|
| 42 |
|
| 43 |
if st.button("Predict", type='primary'):
|
| 44 |
-
response = requests.post("https://praneeth232-backend-space.hf.space/v1/
|
| 45 |
if response.status_code == 200:
|
| 46 |
result = response.json()
|
| 47 |
predicted_price = result["Predicted_MEDV"]
|
|
@@ -55,7 +55,7 @@ st.subheader("Batch Prediction")
|
|
| 55 |
file = st.file_uploader("Upload CSV file", type=["csv"])
|
| 56 |
if file is not None:
|
| 57 |
if st.button("Predict for Batch", type='primary'):
|
| 58 |
-
response = requests.post("https://praneeth232-backend-space.hf.space/v1/
|
| 59 |
if response.status_code == 200:
|
| 60 |
result = response.json()
|
| 61 |
st.header("Batch Prediction Results")
|
|
|
|
| 41 |
}])
|
| 42 |
|
| 43 |
if st.button("Predict", type='primary'):
|
| 44 |
+
response = requests.post("https://praneeth232-backend-space.hf.space/v1/house", json=input_data) # enter user name and space name before running the cell
|
| 45 |
if response.status_code == 200:
|
| 46 |
result = response.json()
|
| 47 |
predicted_price = result["Predicted_MEDV"]
|
|
|
|
| 55 |
file = st.file_uploader("Upload CSV file", type=["csv"])
|
| 56 |
if file is not None:
|
| 57 |
if st.button("Predict for Batch", type='primary'):
|
| 58 |
+
response = requests.post("https://praneeth232-backend-space.hf.space/v1/housebatch", files={"file": file}) # enter user name and space name before running the cell
|
| 59 |
if response.status_code == 200:
|
| 60 |
result = response.json()
|
| 61 |
st.header("Batch Prediction Results")
|