Update README.md
Browse files
README.md
CHANGED
@@ -28,14 +28,12 @@ This model is an attempt to simplify code understanding by generating line by li
|
|
28 |
|
29 |
```py
|
30 |
from transformers import AutoTokenizer, T5ForConditionalGeneration, SummarizationPipeline
|
31 |
-
import torch
|
32 |
|
33 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
34 |
|
35 |
pipeline = SummarizationPipeline(
|
36 |
model=T5ForConditionalGeneration.from_pretrained("sagard21/python-code-explainer"),
|
37 |
tokenizer=AutoTokenizer.from_pretrained("sagard21/python-code-explainer", skip_special_tokens=True),
|
38 |
-
device=device
|
39 |
)
|
40 |
|
41 |
raw_code = """
|
|
|
28 |
|
29 |
```py
|
30 |
from transformers import AutoTokenizer, T5ForConditionalGeneration, SummarizationPipeline
|
|
|
31 |
|
32 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
33 |
|
34 |
pipeline = SummarizationPipeline(
|
35 |
model=T5ForConditionalGeneration.from_pretrained("sagard21/python-code-explainer"),
|
36 |
tokenizer=AutoTokenizer.from_pretrained("sagard21/python-code-explainer", skip_special_tokens=True),
|
|
|
37 |
)
|
38 |
|
39 |
raw_code = """
|