Update app.py
Browse files
app.py
CHANGED
@@ -50,7 +50,7 @@ def predict(text, target, chosen_model):
|
|
50 |
checkpoint = kw_to_hf[chosen_model] # "neuralmind/bert-base-portuguese-cased"
|
51 |
if '/' in checkpoint:
|
52 |
tokenizer = AutoTokenizer.from_pretrained(checkpoint, use_fast=True, model_max_length=512)
|
53 |
-
else
|
54 |
tokenizer = AutoTokenizer.from_pretrained(checkpoint, use_fast=True)
|
55 |
|
56 |
tokpair = tokenizer(text, target, truncation=True, padding='max_length', return_tensors='tf', return_token_type_ids=False)
|
|
|
50 |
checkpoint = kw_to_hf[chosen_model] # "neuralmind/bert-base-portuguese-cased"
|
51 |
if '/' in checkpoint:
|
52 |
tokenizer = AutoTokenizer.from_pretrained(checkpoint, use_fast=True, model_max_length=512)
|
53 |
+
else:
|
54 |
tokenizer = AutoTokenizer.from_pretrained(checkpoint, use_fast=True)
|
55 |
|
56 |
tokpair = tokenizer(text, target, truncation=True, padding='max_length', return_tensors='tf', return_token_type_ids=False)
|