ayush-vatsal commited on
Commit
edbcc20
1 Parent(s): 0dd0c2e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -13,14 +13,15 @@ st.set_page_config(
13
  layout='wide'
14
  )
15
 
16
- project = hopsworks.login()
17
- fs = project.get_feature_store()
18
-
19
- mr = project.get_model_registry()
20
- model = mr.get_model("car_prices", version=1)
21
- model_dir = model.download()
22
- model = joblib.load(model_dir + "/car_prices_model.pkl")
23
 
 
 
 
 
 
24
  header = st.container()
25
 
26
  model_train = st.container()
@@ -96,10 +97,9 @@ if (input_list[13] == "Manual"):
96
  df = pd.DataFrame(input_list)
97
  res = model.predict(df.T)[0].round(4)
98
 
99
- # col_but = st.columns(5)
100
  with model_train:
101
  disp = st.columns(5)
102
  pred_button = disp[2].button('Evaluate price')
103
  if pred_button:
104
  with st.spinner():
105
- st.write(f'#### Evaluated price of the car: ₹ {res:,.2f}')
 
13
  layout='wide'
14
  )
15
 
16
+ def model():
17
+ project = hopsworks.login()
18
+ fs = project.get_feature_store()
 
 
 
 
19
 
20
+ mr = project.get_model_registry()
21
+ model = mr.get_model("car_prices", version=1)
22
+ model_dir = model.download()
23
+ mode = joblib.load(model_dir + "/car_prices_model.pkl")
24
+ return mode
25
  header = st.container()
26
 
27
  model_train = st.container()
 
97
  df = pd.DataFrame(input_list)
98
  res = model.predict(df.T)[0].round(4)
99
 
 
100
  with model_train:
101
  disp = st.columns(5)
102
  pred_button = disp[2].button('Evaluate price')
103
  if pred_button:
104
  with st.spinner():
105
+ st.write(f'#### Evaluated price of the car(in lakhs): ₹ {res:,.4f}')