Update README.md
Browse files
README.md
CHANGED
|
@@ -27,10 +27,9 @@ load the model into a `pipeline` object:
|
|
| 27 |
```
|
| 28 |
from transformers import pipeline
|
| 29 |
import torch
|
| 30 |
-
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
| 31 |
my_chatbot = pipeline('text-generation',
|
| 32 |
'pszemraj/gpt-peter-2.7B',
|
| 33 |
-
device=0 if
|
| 34 |
)
|
| 35 |
```
|
| 36 |
|
|
|
|
| 27 |
```
|
| 28 |
from transformers import pipeline
|
| 29 |
import torch
|
|
|
|
| 30 |
my_chatbot = pipeline('text-generation',
|
| 31 |
'pszemraj/gpt-peter-2.7B',
|
| 32 |
+
device=0 if torch.cuda.is_available() else -1,
|
| 33 |
)
|
| 34 |
```
|
| 35 |
|