jaifar530 commited on
Commit
a368a75
Β·
unverified Β·
1 Parent(s): 7a03f44

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -2
app.py CHANGED
@@ -328,13 +328,15 @@ if press_me_button:
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
  if 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="βœ…")
@@ -359,6 +361,17 @@ if press_me_button:
359
  # animation_length="infinite",
360
  # )
361
 
 
 
 
 
 
 
 
 
 
 
 
362
  else:
363
  # Repeat the text with a space at the end of each iteration
364
 
 
328
  st.progress(float(prob))
329
 
330
  st.write(f"Sorted probab: {sorted_probabilities[0][1] }")
331
+ max_cnn_prob = float(sorted_probabilities[0][1])
332
+
333
+
334
  if ridge_prediction == extra_trees_prediction == predicted_author:
335
  st.success(f"Most likely written by: **{ridge_name}**", icon="βœ…")
336
  st.info("We are quite confident in the accuracy of this result.", icon="ℹ️")
337
 
338
 
339
+ elif max_cnn_prob == 0.1:
340
  if extra_trees_prediction == predicted_author:
341
  st.success(f"Most likely written by: **{extra_trees_name}**", icon="βœ…")
342
  st.success(f"2nd Most likely written by: **{ridge_name}**", icon="βœ…")
 
361
  # animation_length="infinite",
362
  # )
363
 
364
+ elif ridge_prediction == extra_trees_prediction:
365
+ st.success(f"Most likely written by: **{ridge_name}**", icon="βœ…")
366
+ st.success(f"2nd Most likely written by: **{cnn_name}**", icon="βœ…")
367
+ st.warning(f"**Notice:** The input text has been magnified {amplify} times to better capture its characteristics and patterns.", icon="⚠️")
368
+ st.write("_" * 30)
369
+ # rain(
370
+ # emoji="😐",
371
+ # font_size=54,
372
+ # falling_speed=5,
373
+ # animation_length="infinite",
374
+ # )
375
  else:
376
  # Repeat the text with a space at the end of each iteration
377