Spaces:
Running
Running
aliasgerovs
commited on
Commit
•
fb165e8
1
Parent(s):
a1420b8
Update app.py
Browse files
app.py
CHANGED
@@ -186,7 +186,7 @@ text_bc_model_path = "polygraf-ai/v3-bert-3-2m-trun-bc-lighter-spec"
|
|
186 |
text_bc_tokenizer = AutoTokenizer.from_pretrained(text_bc_model_path)
|
187 |
text_bc_model = AutoModelForSequenceClassification.from_pretrained(text_bc_model_path).to(device)
|
188 |
|
189 |
-
text_mc_model_path = "polygraf-ai/text-detect-mc-bert-base-uncased-v1-bert-429k-
|
190 |
text_mc_tokenizer = AutoTokenizer.from_pretrained(text_mc_model_path)
|
191 |
text_mc_model = AutoModelForSequenceClassification.from_pretrained(text_mc_model_path).to(device)
|
192 |
|
@@ -287,7 +287,7 @@ def ai_generated_test(ai_option, input):
|
|
287 |
|
288 |
for i in range(samples_len):
|
289 |
cleaned_text_bc = remove_special_characters(segments[i])
|
290 |
-
cleaned_text_mc =
|
291 |
bc_score = predict_bc(text_bc_model, text_bc_tokenizer,cleaned_text_bc )
|
292 |
mc_score = predict_mc(text_mc_model, text_mc_tokenizer, cleaned_text_mc)
|
293 |
bc_scores.append(bc_score)
|
|
|
186 |
text_bc_tokenizer = AutoTokenizer.from_pretrained(text_bc_model_path)
|
187 |
text_bc_model = AutoModelForSequenceClassification.from_pretrained(text_bc_model_path).to(device)
|
188 |
|
189 |
+
text_mc_model_path = "polygraf-ai/text-detect-mc-bert-base-uncased-v1-bert-429k-lighter-spec"
|
190 |
text_mc_tokenizer = AutoTokenizer.from_pretrained(text_mc_model_path)
|
191 |
text_mc_model = AutoModelForSequenceClassification.from_pretrained(text_mc_model_path).to(device)
|
192 |
|
|
|
287 |
|
288 |
for i in range(samples_len):
|
289 |
cleaned_text_bc = remove_special_characters(segments[i])
|
290 |
+
cleaned_text_mc = remove_special_characters(segments[i])
|
291 |
bc_score = predict_bc(text_bc_model, text_bc_tokenizer,cleaned_text_bc )
|
292 |
mc_score = predict_mc(text_mc_model, text_mc_tokenizer, cleaned_text_mc)
|
293 |
bc_scores.append(bc_score)
|