Update app.py
Browse files
app.py
CHANGED
@@ -28,6 +28,8 @@ def load_model():
|
|
28 |
|
29 |
def align_word_ids(texts):
|
30 |
|
|
|
|
|
31 |
tokenized_inputs = tokenizer(texts, padding='max_length', max_length=218, truncation=True)
|
32 |
|
33 |
word_ids = tokenized_inputs.word_ids()
|
|
|
28 |
|
29 |
def align_word_ids(texts):
|
30 |
|
31 |
+
trainer, model, tokenizer = load_model()
|
32 |
+
|
33 |
tokenized_inputs = tokenizer(texts, padding='max_length', max_length=218, truncation=True)
|
34 |
|
35 |
word_ids = tokenized_inputs.word_ids()
|