data2aihub commited on
Commit
5f947ad
·
verified ·
1 Parent(s): e4d3ec8

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. README.md +1 -4
  2. app.py +1 -1
README.md CHANGED
@@ -1,6 +1,3 @@
1
- ---
2
- sdk: streamlit
3
- ---
4
  -------
5
  title: SuperKartPredictionFrontend
6
  emoji: 🏢
@@ -10,4 +7,4 @@ sdk: streamlit
10
  sdk_version: streamlit==1.43.2 # Added the sdk_version field
11
  app_file: app.py
12
  pinned: false
13
- ------
 
 
 
 
1
  -------
2
  title: SuperKartPredictionFrontend
3
  emoji: 🏢
 
7
  sdk_version: streamlit==1.43.2 # Added the sdk_version field
8
  app_file: app.py
9
  pinned: false
10
+ ------
app.py CHANGED
@@ -45,7 +45,7 @@ st.write("✅ Before API call")
45
  if st.button("Predict"):
46
  response = requests.post("https://data2aihub-SuperKartPredictionBackend.hf.space/v1/revenue", json=input_data.to_dict(orient='records')[0]) # Send data to Flask API
47
  if response.status_code == 200:
48
- prediction = response.json()['Predicted Price (in dollars)']
49
  st.success(f"Predicted Rental Price (in dollars): {prediction}")
50
  else:
51
  st.error("Error making prediction.")
 
45
  if st.button("Predict"):
46
  response = requests.post("https://data2aihub-SuperKartPredictionBackend.hf.space/v1/revenue", json=input_data.to_dict(orient='records')[0]) # Send data to Flask API
47
  if response.status_code == 200:
48
+ prediction = response.json()['Predicted Revenue (in dollars)']
49
  st.success(f"Predicted Rental Price (in dollars): {prediction}")
50
  else:
51
  st.error("Error making prediction.")