Spaces:
Running
Running
Update models.py
Browse files
models.py
CHANGED
@@ -12,7 +12,7 @@ class Models():
|
|
12 |
self.load_trained_models()
|
13 |
|
14 |
def load_trained_models(self):
|
15 |
-
tokenizer = AutoTokenizer.from_pretrained("Jean-Baptiste/camembert-ner-with-dates"
|
16 |
model = AutoModelForTokenClassification.from_pretrained("Jean-Baptiste/camembert-ner-with-dates")
|
17 |
self.ner = pipeline('ner', model=model, tokenizer=tokenizer, aggregation_strategy="simple")
|
18 |
current_directory = os.path.dirname(os.path.realpath(__file__))
|
|
|
12 |
self.load_trained_models()
|
13 |
|
14 |
def load_trained_models(self):
|
15 |
+
tokenizer = AutoTokenizer.from_pretrained("Jean-Baptiste/camembert-ner-with-dates")
|
16 |
model = AutoModelForTokenClassification.from_pretrained("Jean-Baptiste/camembert-ner-with-dates")
|
17 |
self.ner = pipeline('ner', model=model, tokenizer=tokenizer, aggregation_strategy="simple")
|
18 |
current_directory = os.path.dirname(os.path.realpath(__file__))
|