dayannex commited on
Commit
2959130
·
1 Parent(s): 4369a32

app texto limite size

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -335,7 +335,7 @@ class ModeloDataset:
335
  def aplicar_modelo(self,_sentences,idioma, etiquetas):
336
  if idioma=="es":
337
  self.tokenizer = AutoTokenizer.from_pretrained("BSC-LT/roberta_model_for_anonimization")
338
- tokenized_text=[self.tokenizer.tokenize(sentence[:250]) for sentence in _sentences]
339
 
340
  ids = [self.tokenizer.convert_tokens_to_ids(x) for x in tokenized_text]
341
  MAX_LEN=128
@@ -376,7 +376,7 @@ class ModeloDataset:
376
 
377
  print('idioma:',idioma)
378
  self.tokenizer = AutoTokenizer.from_pretrained("FacebookAI/xlm-roberta-large-finetuned-conll03-english")
379
- tokenized_text=[self.tokenizer.tokenize(sentence) for sentence in _sentences]
380
 
381
  ids = [self.tokenizer.convert_tokens_to_ids(x) for x in tokenized_text]
382
 
 
335
  def aplicar_modelo(self,_sentences,idioma, etiquetas):
336
  if idioma=="es":
337
  self.tokenizer = AutoTokenizer.from_pretrained("BSC-LT/roberta_model_for_anonimization")
338
+ tokenized_text=[self.tokenizer.tokenize(sentence[:500]) for sentence in _sentences]
339
 
340
  ids = [self.tokenizer.convert_tokens_to_ids(x) for x in tokenized_text]
341
  MAX_LEN=128
 
376
 
377
  print('idioma:',idioma)
378
  self.tokenizer = AutoTokenizer.from_pretrained("FacebookAI/xlm-roberta-large-finetuned-conll03-english")
379
+ tokenized_text=[self.tokenizer.tokenize(sentence[:500]) for sentence in _sentences]
380
 
381
  ids = [self.tokenizer.convert_tokens_to_ids(x) for x in tokenized_text]
382