jaifar530 commited on
Commit
3b5315f
Β·
unverified Β·
1 Parent(s): b99200a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +38 -0
app.py CHANGED
@@ -12,6 +12,8 @@ import numpy as np
12
  from PIL import Image
13
  from joblib import load
14
  import math
 
 
15
 
16
 
17
  # Custom headers for the HTTP request
@@ -323,6 +325,12 @@ if press_me_button:
323
  if ridge_prediction == extra_trees_prediction == predicted_author:
324
  st.success(f"Most likely written by: **{ridge_name}**", icon="βœ…")
325
  st.info("We are quite confident in the accuracy of this result.", icon="ℹ️")
 
 
 
 
 
 
326
 
327
  else:
328
  # Repeat the text with a space at the end of each iteration
@@ -372,24 +380,48 @@ if press_me_button:
372
  st.success(f"Most likely written by: **{ridge_name}**", icon="βœ…")
373
  st.warning(f"**Notice:** Your input text has been magnified {amplify} times to better capture its characteristics and patterns.", icon="⚠️")
374
  st.write("_" * 30)
 
 
 
 
 
 
375
 
376
  elif ridge_prediction == extra_trees_prediction:
377
  st.success(f"Most likely written by: **{ridge_name}**", icon="βœ…")
378
  st.success(f"2nd Most likely written by: **{cnn_name}**", icon="βœ…")
379
  st.warning(f"**Notice:** The input text has been magnified {amplify} times to better capture its characteristics and patterns.", icon="⚠️")
380
  st.write("_" * 30)
 
 
 
 
 
 
381
 
382
  elif extra_trees_prediction == predicted_author:
383
  st.success(f"Most likely written by: **{extra_trees_name}**", icon="βœ…")
384
  st.success(f"2nd Most likely written by: **{ridge_name}**", icon="βœ…")
385
  st.warning(f"**Notice:** The input text has been magnified {amplify} times to better capture its characteristics and patterns.", icon="⚠️")
386
  st.write("_" * 30)
 
 
 
 
 
 
387
 
388
  elif ridge_prediction == predicted_author:
389
  st.success(f"Most likely written by: **{ridge_name}**", icon="βœ…")
390
  st.success(f"2nd Most likely written by: **{extra_trees_name}**", icon="βœ…")
391
  st.warning(f"**Notice:** The input text has been magnified {amplify} times to better capture its characteristics and patterns.", icon="⚠️")
392
  st.write("_" * 30)
 
 
 
 
 
 
393
 
394
 
395
  else:
@@ -399,6 +431,12 @@ if press_me_button:
399
  st.success(f"3- **{extra_trees_name}**", icon="βœ…")
400
  st.warning(f"**Notice 2:** The input text has been magnified {amplify} times to better capture its characteristics and patterns.", icon="⚠️")
401
  st.write("_" * 30)
 
 
 
 
 
 
402
 
403
 
404
  # with st.expander("What is this project about?"):
 
12
  from PIL import Image
13
  from joblib import load
14
  import math
15
+ from streamlit_extras.let_it_rain import rain
16
+
17
 
18
 
19
  # Custom headers for the HTTP request
 
325
  if ridge_prediction == extra_trees_prediction == predicted_author:
326
  st.success(f"Most likely written by: **{ridge_name}**", icon="βœ…")
327
  st.info("We are quite confident in the accuracy of this result.", icon="ℹ️")
328
+ rain(
329
+ emoji="πŸ˜ƒ",
330
+ font_size=54,
331
+ falling_speed=5,
332
+ animation_length="infinite",
333
+ )
334
 
335
  else:
336
  # Repeat the text with a space at the end of each iteration
 
380
  st.success(f"Most likely written by: **{ridge_name}**", icon="βœ…")
381
  st.warning(f"**Notice:** Your input text has been magnified {amplify} times to better capture its characteristics and patterns.", icon="⚠️")
382
  st.write("_" * 30)
383
+ rain(
384
+ emoji="πŸ˜ƒ",
385
+ font_size=54,
386
+ falling_speed=5,
387
+ animation_length="infinite",
388
+ )
389
 
390
  elif ridge_prediction == extra_trees_prediction:
391
  st.success(f"Most likely written by: **{ridge_name}**", icon="βœ…")
392
  st.success(f"2nd Most likely written by: **{cnn_name}**", icon="βœ…")
393
  st.warning(f"**Notice:** The input text has been magnified {amplify} times to better capture its characteristics and patterns.", icon="⚠️")
394
  st.write("_" * 30)
395
+ rain(
396
+ emoji="😐",
397
+ font_size=54,
398
+ falling_speed=5,
399
+ animation_length="infinite",
400
+ )
401
 
402
  elif extra_trees_prediction == predicted_author:
403
  st.success(f"Most likely written by: **{extra_trees_name}**", icon="βœ…")
404
  st.success(f"2nd Most likely written by: **{ridge_name}**", icon="βœ…")
405
  st.warning(f"**Notice:** The input text has been magnified {amplify} times to better capture its characteristics and patterns.", icon="⚠️")
406
  st.write("_" * 30)
407
+ rain(
408
+ emoji="😐",
409
+ font_size=54,
410
+ falling_speed=5,
411
+ animation_length="infinite",
412
+ )
413
 
414
  elif ridge_prediction == predicted_author:
415
  st.success(f"Most likely written by: **{ridge_name}**", icon="βœ…")
416
  st.success(f"2nd Most likely written by: **{extra_trees_name}**", icon="βœ…")
417
  st.warning(f"**Notice:** The input text has been magnified {amplify} times to better capture its characteristics and patterns.", icon="⚠️")
418
  st.write("_" * 30)
419
+ rain(
420
+ emoji="😐",
421
+ font_size=54,
422
+ falling_speed=5,
423
+ animation_length="infinite",
424
+ )
425
 
426
 
427
  else:
 
431
  st.success(f"3- **{extra_trees_name}**", icon="βœ…")
432
  st.warning(f"**Notice 2:** The input text has been magnified {amplify} times to better capture its characteristics and patterns.", icon="⚠️")
433
  st.write("_" * 30)
434
+ rain(
435
+ emoji="πŸ˜•",
436
+ font_size=54,
437
+ falling_speed=5,
438
+ animation_length="infinite",
439
+ )
440
 
441
 
442
  # with st.expander("What is this project about?"):