jaifar530 commited on
Commit
0f8b61e
·
unverified ·
1 Parent(s): 7687e4b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -328,13 +328,13 @@ if press_me_button:
328
  st.progress(float(prob))
329
 
330
  st.write(f"Sorted probab: {sorted_probabilities[0][1] }")
331
-
332
  if ridge_prediction == extra_trees_prediction == predicted_author:
333
  st.success(f"Most likely written by: **{ridge_name}**", icon="✅")
334
  st.info("We are quite confident in the accuracy of this result.", icon="ℹ️")
335
 
336
 
337
- elif float(sorted_probabilities[0][1]) == 0.1:
338
  elif extra_trees_prediction == predicted_author:
339
  st.success(f"Most likely written by: **{extra_trees_name}**", icon="✅")
340
  st.success(f"2nd Most likely written by: **{ridge_name}**", icon="✅")
 
328
  st.progress(float(prob))
329
 
330
  st.write(f"Sorted probab: {sorted_probabilities[0][1] }")
331
+ max_prob = float(sorted_probabilities[0][1])
332
  if ridge_prediction == extra_trees_prediction == predicted_author:
333
  st.success(f"Most likely written by: **{ridge_name}**", icon="✅")
334
  st.info("We are quite confident in the accuracy of this result.", icon="ℹ️")
335
 
336
 
337
+ elif max_prob == 0.1:
338
  elif extra_trees_prediction == predicted_author:
339
  st.success(f"Most likely written by: **{extra_trees_name}**", icon="✅")
340
  st.success(f"2nd Most likely written by: **{ridge_name}**", icon="✅")