Spaces:
Runtime error
Runtime error
Rename app.txt to app.py
Browse files- app.txt β app.py +2 -2
app.txt β app.py
RENAMED
@@ -1,8 +1,8 @@
|
|
1 |
import torch
|
2 |
from transformers import AutoModelForTokenClassification,AutoTokenizer,pipeline
|
3 |
|
4 |
-
model = AutoModelForTokenClassification.from_pretrained('
|
5 |
-
tokenizer = AutoTokenizer.from_pretrained('
|
6 |
|
7 |
def NER(text):
|
8 |
pipline = pipeline(task="token-classification", model=model, tokenizer=tokenizer, aggregation_strategy="simple")
|
|
|
1 |
import torch
|
2 |
from transformers import AutoModelForTokenClassification,AutoTokenizer,pipeline
|
3 |
|
4 |
+
model = AutoModelForTokenClassification.from_pretrained('SeyedAli/Persian-Text-NER-Bert-V1')
|
5 |
+
tokenizer = AutoTokenizer.from_pretrained('SeyedAli/Persian-Text-NER-Bert-V1')
|
6 |
|
7 |
def NER(text):
|
8 |
pipline = pipeline(task="token-classification", model=model, tokenizer=tokenizer, aggregation_strategy="simple")
|