Spaces:
Runtime error
Runtime error
Add pretrained model name
Browse files
app.py
CHANGED
@@ -8,9 +8,10 @@ from ocrpostcorrection.icdar_data import generate_sentences, process_input_ocr
|
|
8 |
from ocrpostcorrection.token_classification import tokenize_and_align_labels
|
9 |
from ocrpostcorrection.utils import predictions_to_labels, predictions2entity_output
|
10 |
|
11 |
-
|
|
|
12 |
|
13 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
14 |
model = BertForTokenClassification.from_pretrained(model_name)
|
15 |
|
16 |
|
|
|
8 |
from ocrpostcorrection.token_classification import tokenize_and_align_labels
|
9 |
from ocrpostcorrection.utils import predictions_to_labels, predictions2entity_output
|
10 |
|
11 |
+
tokenizer_name = 'bert-base-multilingual-cased'
|
12 |
+
model_name = 'jvdzwaan/ocrpostcorrection-task-1'
|
13 |
|
14 |
+
tokenizer = AutoTokenizer.from_pretrained(tokenizer_name)
|
15 |
model = BertForTokenClassification.from_pretrained(model_name)
|
16 |
|
17 |
|