Update README.md
Browse files
README.md
CHANGED
|
@@ -81,7 +81,7 @@ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
| 81 |
|
| 82 |
tokenizer = T5Tokenizer.from_pretrained("scutcyr/BianQue-1.0")
|
| 83 |
model = T5ForConditionalGeneration.from_pretrained("scutcyr/BianQue-1.0")
|
| 84 |
-
|
| 85 |
|
| 86 |
def preprocess(text):
|
| 87 |
text = text.replace("\n", "\\n").replace("\t", "\\t")
|
|
|
|
| 81 |
|
| 82 |
tokenizer = T5Tokenizer.from_pretrained("scutcyr/BianQue-1.0")
|
| 83 |
model = T5ForConditionalGeneration.from_pretrained("scutcyr/BianQue-1.0")
|
| 84 |
+
model = model.to(device)
|
| 85 |
|
| 86 |
def preprocess(text):
|
| 87 |
text = text.replace("\n", "\\n").replace("\t", "\\t")
|