Roy-Pentagon
commited on
Commit
•
b7c4a29
1
Parent(s):
10c6ff1
Fixing the error facing in google colab
Browse filesWhen using (the device) in an argument getting this error in google colab
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument index in method wrapper_CUDA__index_select)
when used .to('cpu'), it runs smoothly and gets the desired result.
Fix this issue
README.md
CHANGED
@@ -44,7 +44,7 @@ device = "cuda"
|
|
44 |
|
45 |
tokenizer = AutoTokenizer.from_pretrained("humarin/chatgpt_paraphraser_on_T5_base")
|
46 |
|
47 |
-
model = AutoModelForSeq2SeqLM.from_pretrained("humarin/chatgpt_paraphraser_on_T5_base").to(
|
48 |
|
49 |
def paraphrase(
|
50 |
question,
|
|
|
44 |
|
45 |
tokenizer = AutoTokenizer.from_pretrained("humarin/chatgpt_paraphraser_on_T5_base")
|
46 |
|
47 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("humarin/chatgpt_paraphraser_on_T5_base").to('cpu')
|
48 |
|
49 |
def paraphrase(
|
50 |
question,
|