Spaces:
Runtime error
Runtime error
jaifar530 commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -324,7 +324,11 @@ if press_me_button:
|
|
| 324 |
st.write(f"Ridge: {ridge_name}")
|
| 325 |
st.write(f"ExtraTree: {extra_trees_name}")
|
| 326 |
st.write(f"CNN: {cnn_name}")
|
| 327 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 328 |
if ridge_prediction == extra_trees_prediction == predicted_author:
|
| 329 |
st.success(f"Most likely written by: **{ridge_name}**", icon="✅")
|
| 330 |
st.info("We are quite confident in the accuracy of this result.", icon="ℹ️")
|
|
@@ -376,7 +380,11 @@ if press_me_button:
|
|
| 376 |
st.write(f"Ridge: {ridge_name}")
|
| 377 |
st.write(f"ExtraTree: {extra_trees_name}")
|
| 378 |
st.write(f"CNN: {cnn_name}")
|
| 379 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 380 |
if ridge_prediction == extra_trees_prediction == predicted_author:
|
| 381 |
st.success(f"Most likely written by: **{ridge_name}**", icon="✅")
|
| 382 |
st.warning(f"**Notice:** Your input text has been magnified {amplify} times to better capture its characteristics and patterns.", icon="⚠️")
|
|
|
|
| 324 |
st.write(f"Ridge: {ridge_name}")
|
| 325 |
st.write(f"ExtraTree: {extra_trees_name}")
|
| 326 |
st.write(f"CNN: {cnn_name}")
|
| 327 |
+
for author, prob in sorted_probabilities:
|
| 328 |
+
display_name = author_map.get(author, author) # Retrieve the display name, fall back to original if not found
|
| 329 |
+
st.write(f"{display_name}: {prob * 100:.2f}%")
|
| 330 |
+
st.progress(float(prob))
|
| 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="ℹ️")
|
|
|
|
| 380 |
st.write(f"Ridge: {ridge_name}")
|
| 381 |
st.write(f"ExtraTree: {extra_trees_name}")
|
| 382 |
st.write(f"CNN: {cnn_name}")
|
| 383 |
+
for author, prob in sorted_probabilities:
|
| 384 |
+
display_name = author_map.get(author, author)
|
| 385 |
+
st.write(f"{display_name}: {prob * 100:.2f}%")
|
| 386 |
+
st.progress(float(prob))
|
| 387 |
+
|
| 388 |
if ridge_prediction == extra_trees_prediction == predicted_author:
|
| 389 |
st.success(f"Most likely written by: **{ridge_name}**", icon="✅")
|
| 390 |
st.warning(f"**Notice:** Your input text has been magnified {amplify} times to better capture its characteristics and patterns.", icon="⚠️")
|