Commit
·
15eab27
1
Parent(s):
f001715
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,9 +8,9 @@ import gradio as gr
|
|
| 8 |
|
| 9 |
def ner_tagging(text):
|
| 10 |
model_name = "hackathon-pln-es/jurisbert-finetuning-ner"
|
| 11 |
-
tokenizer = AutoTokenizer.from_pretrained(model_name, add_prefix_space=True
|
| 12 |
|
| 13 |
-
model = AutoModelForTokenClassification.from_pretrained(model_name
|
| 14 |
nlp = pipeline("ner", model=model, tokenizer=tokenizer)
|
| 15 |
ner_results = nlp(text.lower())
|
| 16 |
|
|
|
|
| 8 |
|
| 9 |
def ner_tagging(text):
|
| 10 |
model_name = "hackathon-pln-es/jurisbert-finetuning-ner"
|
| 11 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name, add_prefix_space=True)
|
| 12 |
|
| 13 |
+
model = AutoModelForTokenClassification.from_pretrained(model_name)
|
| 14 |
nlp = pipeline("ner", model=model, tokenizer=tokenizer)
|
| 15 |
ner_results = nlp(text.lower())
|
| 16 |
|