esun-choi commited on
Commit
ef95d87
·
1 Parent(s): 65f195b

Update ner.py

Browse files
Files changed (1) hide show
  1. ner.py +2 -2
ner.py CHANGED
@@ -2,8 +2,8 @@ from transformers import AutoTokenizer, AutoModelForTokenClassification
2
  from transformers import pipeline
3
  from collections import defaultdict
4
  import torch
5
- #device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
6
- device = torch.device("cuda")
7
  tokenizer = AutoTokenizer.from_pretrained("Leo97/KoELECTRA-small-v3-modu-ner")
8
  model = AutoModelForTokenClassification.from_pretrained("Leo97/KoELECTRA-small-v3-modu-ner")
9
  model.to(device)
 
2
  from transformers import pipeline
3
  from collections import defaultdict
4
  import torch
5
+ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
6
+ #device = torch.device("cuda")
7
  tokenizer = AutoTokenizer.from_pretrained("Leo97/KoELECTRA-small-v3-modu-ner")
8
  model = AutoModelForTokenClassification.from_pretrained("Leo97/KoELECTRA-small-v3-modu-ner")
9
  model.to(device)