Spaces:
Sleeping
Sleeping
Mhammad Ibrahim
commited on
Commit
·
17d7918
1
Parent(s):
f781087
Remove from_tf=True as PyTorch weights are available
Browse files
app.py
CHANGED
@@ -13,8 +13,7 @@ from transformers import AutoTokenizer, AutoModelForTokenClassification, pipelin
|
|
13 |
# Load model and tokenizer from Hugging Face Hub
|
14 |
tokenizer = AutoTokenizer.from_pretrained("Mhammad2023/bert-finetuned-ner")
|
15 |
model = AutoModelForTokenClassification.from_pretrained(
|
16 |
-
"Mhammad2023/bert-finetuned-ner"
|
17 |
-
torch_dtype=torch.float32
|
18 |
)
|
19 |
classifier = pipeline("token-classification", model=model, tokenizer=tokenizer, device="cpu")
|
20 |
|
|
|
13 |
# Load model and tokenizer from Hugging Face Hub
|
14 |
tokenizer = AutoTokenizer.from_pretrained("Mhammad2023/bert-finetuned-ner")
|
15 |
model = AutoModelForTokenClassification.from_pretrained(
|
16 |
+
"Mhammad2023/bert-finetuned-ner"
|
|
|
17 |
)
|
18 |
classifier = pipeline("token-classification", model=model, tokenizer=tokenizer, device="cpu")
|
19 |
|