eljanmahammadli commited on
Commit
2d19a26
1 Parent(s): 4302b12

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -188,7 +188,7 @@ text_bc_model_path = "polygraf-ai/v3-bert-3-2m-trun-bc-lighter-spec"
188
  text_bc_tokenizer = AutoTokenizer.from_pretrained(text_bc_model_path)
189
  text_bc_model = AutoModelForSequenceClassification.from_pretrained(text_bc_model_path).to(device)
190
 
191
- text_mc_model_path = "polygraf-ai/ai-text-detection-mc-robert-open-ai-detector-v4"
192
  text_mc_tokenizer = AutoTokenizer.from_pretrained(text_mc_model_path)
193
  text_mc_model = AutoModelForSequenceClassification.from_pretrained(text_mc_model_path).to(device)
194
 
@@ -213,7 +213,7 @@ def update_character_count(text):
213
  return f"{len(text)} characters"
214
 
215
 
216
- def split_text_allow_complete_sentences_nltk(text, max_length=256, tolerance=40, min_last_segment_length=150, type_det = 'bc'):
217
  sentences = nltk.sent_tokenize(text)
218
  segments = []
219
  current_segment = []
 
188
  text_bc_tokenizer = AutoTokenizer.from_pretrained(text_bc_model_path)
189
  text_bc_model = AutoModelForSequenceClassification.from_pretrained(text_bc_model_path).to(device)
190
 
191
+ text_mc_model_path = "polygraf-ai/text-detect-mc-bert-base-uncased-mistral-openai-447k-256"
192
  text_mc_tokenizer = AutoTokenizer.from_pretrained(text_mc_model_path)
193
  text_mc_model = AutoModelForSequenceClassification.from_pretrained(text_mc_model_path).to(device)
194
 
 
213
  return f"{len(text)} characters"
214
 
215
 
216
+ def split_text_allow_complete_sentences_nltk(text, max_length=256, tolerance=40, min_last_segment_length=150, type_det='bc'):
217
  sentences = nltk.sent_tokenize(text)
218
  segments = []
219
  current_segment = []