Isabel Gwara commited on
Commit
4b51a5a
·
1 Parent(s): 8c8fd89

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -109,7 +109,7 @@ def general_predictor(input_list):
109
  # predict single datapoint
110
  new_input = [features]
111
  result = model.predict(new_input)
112
- return [cat_value_dicts[final_colname][result[0]], cat_value_dicts[final_colname][result[1]]]
113
 
114
  # add data labels to replace those lost via star-args
115
  inputls = []
@@ -129,10 +129,9 @@ for colname in data.columns:
129
 
130
  # generate gradio interface
131
  if st.button("Submit"):
132
- results = general_predictor(inputls)
133
 
134
- st.text(f"Your most likley recommendation: {results[0]}")
135
- st.text(f"Your second best recommendation: {results[1]}")
136
 
137
  with open('info.md') as f:
138
  st.markdown(f.read())
 
109
  # predict single datapoint
110
  new_input = [features]
111
  result = model.predict(new_input)
112
+ return cat_value_dicts[final_colname][result[0]]
113
 
114
  # add data labels to replace those lost via star-args
115
  inputls = []
 
129
 
130
  # generate gradio interface
131
  if st.button("Submit"):
132
+ prediction = general_predictor(inputls)
133
 
134
+ st.text(f"Our best recommendation for you: {prediction}")
 
135
 
136
  with open('info.md') as f:
137
  st.markdown(f.read())