jaifar530 commited on
Commit
69b40a6
·
unverified ·
1 Parent(s): 8fe2540

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -8
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
- # for author, prob in sorted_probabilities:
120
- # st.write(f"{author}: {prob * 100:.2f}%")
121
-
 
 
 
 
 
 
122
  for author, prob in sorted_probabilities:
123
- st.write(f"{author}: {prob * 100:.2f}%")
 
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