Spaces:
Running
Running
eljanmahammadli
commited on
Commit
•
2da9742
1
Parent(s):
c7ad932
Update app.py
Browse files
app.py
CHANGED
@@ -189,7 +189,7 @@ text_bc_model_path = "polygraf-ai/v3-bert-3-2m-trun-bc-lighter-spec"
|
|
189 |
text_bc_tokenizer = AutoTokenizer.from_pretrained(text_bc_model_path)
|
190 |
text_bc_model = AutoModelForSequenceClassification.from_pretrained(text_bc_model_path).to(device)
|
191 |
|
192 |
-
text_mc_model_path = "polygraf-ai/text-detect-mc-bert-base-uncased-
|
193 |
text_mc_tokenizer = AutoTokenizer.from_pretrained(text_mc_model_path)
|
194 |
text_mc_model = AutoModelForSequenceClassification.from_pretrained(text_mc_model_path).to(device)
|
195 |
|
@@ -302,14 +302,10 @@ def ai_generated_test(ai_option, input):
|
|
302 |
average_mc_scores = np.mean(mc_scores_array, axis=0)
|
303 |
bc_score_list = average_bc_scores.tolist()
|
304 |
mc_score_list = average_mc_scores.tolist()
|
305 |
-
|
306 |
-
# Temporary
|
307 |
-
mc_score_list[1] = mc_score_list[0] + mc_score_list[1]
|
308 |
-
mc_score_list = mc_score_list[1:]
|
309 |
|
310 |
bc_score = {"AI": bc_score[1].item(), "HUMAN": bc_score[0].item()}
|
311 |
mc_score = {}
|
312 |
-
label_map = ["OpenAI GPT", "CLAUDE", "
|
313 |
|
314 |
for score, label in zip(mc_score_list, label_map):
|
315 |
mc_score[label.upper()] = score
|
@@ -489,7 +485,7 @@ with gr.Blocks() as demo:
|
|
489 |
d1 = today.strftime("%d/%B/%Y")
|
490 |
d1 = d1.split("/")
|
491 |
|
492 |
-
model_list = ["OpenAI GPT", "CLAUDE", "
|
493 |
domain_list = ["com", "org", "net", "int", "edu", "gov", "mil"]
|
494 |
gr.Markdown(
|
495 |
"""
|
|
|
189 |
text_bc_tokenizer = AutoTokenizer.from_pretrained(text_bc_model_path)
|
190 |
text_bc_model = AutoModelForSequenceClassification.from_pretrained(text_bc_model_path).to(device)
|
191 |
|
192 |
+
text_mc_model_path = "polygraf-ai/text-detect-mc-bert-base-uncased-mistral-openai-447k-256"
|
193 |
text_mc_tokenizer = AutoTokenizer.from_pretrained(text_mc_model_path)
|
194 |
text_mc_model = AutoModelForSequenceClassification.from_pretrained(text_mc_model_path).to(device)
|
195 |
|
|
|
302 |
average_mc_scores = np.mean(mc_scores_array, axis=0)
|
303 |
bc_score_list = average_bc_scores.tolist()
|
304 |
mc_score_list = average_mc_scores.tolist()
|
|
|
|
|
|
|
|
|
305 |
|
306 |
bc_score = {"AI": bc_score[1].item(), "HUMAN": bc_score[0].item()}
|
307 |
mc_score = {}
|
308 |
+
label_map = ["OpenAI GPT", "Mistral", "CLAUDE", "Gemini", "LLAMA 2"]
|
309 |
|
310 |
for score, label in zip(mc_score_list, label_map):
|
311 |
mc_score[label.upper()] = score
|
|
|
485 |
d1 = today.strftime("%d/%B/%Y")
|
486 |
d1 = d1.split("/")
|
487 |
|
488 |
+
model_list = ["OpenAI GPT", "Mistral", "CLAUDE", "Gemini", "LLAMA2"]
|
489 |
domain_list = ["com", "org", "net", "int", "edu", "gov", "mil"]
|
490 |
gr.Markdown(
|
491 |
"""
|