Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -34,7 +34,7 @@ input_data = pd.DataFrame([{
|
|
| 34 |
|
| 35 |
# Make prediction when the "Predict" button is clicked
|
| 36 |
if st.button("Predict"):
|
| 37 |
-
response = requests.post("https://RedRooster99-projectfrontend.hf.space/v1/
|
| 38 |
if response.status_code == 200:
|
| 39 |
prediction = response.json()['Predicted Price']
|
| 40 |
st.success(f"Superkart Price: {prediction}")
|
|
|
|
| 34 |
|
| 35 |
# Make prediction when the "Predict" button is clicked
|
| 36 |
if st.button("Predict"):
|
| 37 |
+
response = requests.post("https://RedRooster99-projectfrontend.hf.space/v1/superkart", json=input_data.to_dict(orient='records')[0]) # Send data to Flask API
|
| 38 |
if response.status_code == 200:
|
| 39 |
prediction = response.json()['Predicted Price']
|
| 40 |
st.success(f"Superkart Price: {prediction}")
|