kdevoe commited on
Commit
95e1295
·
verified ·
1 Parent(s): 5f60ed5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -18,10 +18,10 @@ if st.button("Calculate Scores"):
18
  scores = inference(user_input)
19
  st.write(scores)
20
  st.write(categories)
21
- #scores = [round(score * 2) / 2 for score in scores]
22
- #new_table = {categories[i]: scores[i] for i in range(len(categories))}
23
- #scores_df = pd.DataFrame(new_table, index=['Score'])
24
- #st.table(scores_df)
25
 
26
  # Display the initial scores table
27
  st.table(scores_df)
 
18
  scores = inference(user_input)
19
  st.write(scores)
20
  st.write(categories)
21
+ scores = [round(score * 2) / 2 for score in scores[0]]
22
+ new_table = {categories[i]: scores[0][i] for i in range(len(categories))}
23
+ scores_df = pd.DataFrame(new_table, index=['Score'])
24
+ st.table(scores_df)
25
 
26
  # Display the initial scores table
27
  st.table(scores_df)