Spaces:
Running
Running
jaifar530
commited on
Update app.py
Browse files
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?"):
|