Spaces:
Running
Running
jaifar530
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -116,17 +116,20 @@ if press_me_button:
|
|
116 |
|
117 |
st.write(f"The text is most likely written by: {predicted_author}")
|
118 |
st.write("Probabilities for each author are (sorted):")
|
119 |
-
#
|
120 |
-
|
121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
for author, prob in sorted_probabilities:
|
123 |
-
|
|
|
124 |
st.progress(float(prob))
|
125 |
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
# Using expander to make FAQ sections
|
131 |
st.subheader("Frequently Asked Questions (FAQ)")
|
132 |
|
|
|
116 |
|
117 |
st.write(f"The text is most likely written by: {predicted_author}")
|
118 |
st.write("Probabilities for each author are (sorted):")
|
119 |
+
# Mapping the internal names to display names
|
120 |
+
author_map = {
|
121 |
+
"googlebard": "Google Bard",
|
122 |
+
"gpt3": "ChatGPT-3",
|
123 |
+
"gpt4": "ChatGPT-4",
|
124 |
+
"huggingface": "HuggingChat",
|
125 |
+
"human": "Human-Written"
|
126 |
+
}
|
127 |
+
|
128 |
for author, prob in sorted_probabilities:
|
129 |
+
display_name = author_map.get(author, author) # Retrieve the display name, fall back to original if not found
|
130 |
+
st.write(f"{display_name}: {prob * 100:.2f}%")
|
131 |
st.progress(float(prob))
|
132 |
|
|
|
|
|
|
|
|
|
133 |
# Using expander to make FAQ sections
|
134 |
st.subheader("Frequently Asked Questions (FAQ)")
|
135 |
|