shibing624
commited on
Commit
•
a3383e2
1
Parent(s):
1823f8a
Update README.md
Browse files
README.md
CHANGED
@@ -47,7 +47,7 @@ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
47 |
|
48 |
tokenizer = BertTokenizer.from_pretrained("shibing624/macbert4csc-base-chinese")
|
49 |
model = BertForMaskedLM.from_pretrained("shibing624/macbert4csc-base-chinese")
|
50 |
-
model
|
51 |
|
52 |
texts = ["今天新情很好", "你找到你最喜欢的工作,我也很高心。"]
|
53 |
with torch.no_grad():
|
|
|
47 |
|
48 |
tokenizer = BertTokenizer.from_pretrained("shibing624/macbert4csc-base-chinese")
|
49 |
model = BertForMaskedLM.from_pretrained("shibing624/macbert4csc-base-chinese")
|
50 |
+
model.to(device)
|
51 |
|
52 |
texts = ["今天新情很好", "你找到你最喜欢的工作,我也很高心。"]
|
53 |
with torch.no_grad():
|