Spaces:
No application file
No application file
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -37,7 +37,7 @@ input_data = pd.DataFrame([{
|
|
| 37 |
|
| 38 |
# Make prediction when the "Predict" button is clicked
|
| 39 |
if st.button("Predict"):
|
| 40 |
-
response = requests.post("https://LalithaShiva-
|
| 41 |
if response.status_code == 200:
|
| 42 |
result = response.json()['Predicted Price (in dollars)']
|
| 43 |
st.success(f"Predicted Rental Price (in dollars): {prediction}")
|
|
|
|
| 37 |
|
| 38 |
# Make prediction when the "Predict" button is clicked
|
| 39 |
if st.button("Predict"):
|
| 40 |
+
response = requests.post("https://LalithaShiva-SalesAnalysisPredictionFrontend.hf.space/v1/sksales", json=input_data.to_dict(orient='records')[0]) # Send data to Flask API
|
| 41 |
if response.status_code == 200:
|
| 42 |
result = response.json()['Predicted Price (in dollars)']
|
| 43 |
st.success(f"Predicted Rental Price (in dollars): {prediction}")
|