Heiko Hotz commited on
Commit
a701044
1 Parent(s): 2c54b95

initial commit

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -143,9 +143,9 @@ if st.button('Analyze'):
143
  answer = ""
144
  with open("nbest.json") as jf:
145
  data = json.load(jf)
146
- for i in range(int(number_results)-1):
147
  answer += f"Answer {i+1}: {data['0'][i]['text']}\n"
148
- answer += f"Probability: {data['0'][i]['probability']}\n\n"
149
  st.success(answer)
150
  st.success("Successfully processed contract!")
151
  else:
 
143
  answer = ""
144
  with open("nbest.json") as jf:
145
  data = json.load(jf)
146
+ for i in range(int(number_results)):
147
  answer += f"Answer {i+1}: {data['0'][i]['text']}\n"
148
+ answer += f"Probability: {round(data['0'][i]['probability']*100,1)}%\n\n"
149
  st.success(answer)
150
  st.success("Successfully processed contract!")
151
  else: