Update README.md
Browse files
README.md
CHANGED
@@ -58,7 +58,7 @@ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
|
58 |
tokenizer = AutoTokenizer.from_pretrained("mxmax/Chinese_Chat_T5_Base")
|
59 |
model = AutoModelForSeq2SeqLM.from_pretrained("mxmax/Chinese_Chat_T5_Base")
|
60 |
device = 'cuda' if cuda.is_available() else 'cpu'
|
61 |
-
|
62 |
def postprocess(text):
|
63 |
return text.replace(".", "").replace('</>','')
|
64 |
|
|
|
58 |
tokenizer = AutoTokenizer.from_pretrained("mxmax/Chinese_Chat_T5_Base")
|
59 |
model = AutoModelForSeq2SeqLM.from_pretrained("mxmax/Chinese_Chat_T5_Base")
|
60 |
device = 'cuda' if cuda.is_available() else 'cpu'
|
61 |
+
model.to(device)
|
62 |
def postprocess(text):
|
63 |
return text.replace(".", "").replace('</>','')
|
64 |
|