Spaces:
Runtime error
Runtime error
jaifar530
commited on
Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
| 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
|
| 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 |
|