Update README.md
Browse files
README.md
CHANGED
@@ -38,7 +38,7 @@ from transformers import AutoModel, AutoTokenizer
|
|
38 |
import torch
|
39 |
|
40 |
# get device
|
41 |
-
device = torch.device("cuda:
|
42 |
|
43 |
# load model
|
44 |
# IF you cannot connect to huggingface.co, you can download the repo and set from_pretrained path as the loacl dir path, replacing "yuxindu/segvol"
|
@@ -114,7 +114,7 @@ from transformers import AutoModel, AutoTokenizer
|
|
114 |
import torch
|
115 |
|
116 |
# get device
|
117 |
-
device = torch.device("cuda:
|
118 |
|
119 |
# load model
|
120 |
# IF you cannot connect to huggingface.co, you can download the repo and set from_pretrained path as the loacl dir path, replacing "yuxindu/segvol"
|
|
|
38 |
import torch
|
39 |
|
40 |
# get device
|
41 |
+
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
42 |
|
43 |
# load model
|
44 |
# IF you cannot connect to huggingface.co, you can download the repo and set from_pretrained path as the loacl dir path, replacing "yuxindu/segvol"
|
|
|
114 |
import torch
|
115 |
|
116 |
# get device
|
117 |
+
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
118 |
|
119 |
# load model
|
120 |
# IF you cannot connect to huggingface.co, you can download the repo and set from_pretrained path as the loacl dir path, replacing "yuxindu/segvol"
|