Update README.md
Browse files
README.md
CHANGED
|
@@ -39,8 +39,8 @@ from transformers import pipeline, set_seed
|
|
| 39 |
summarizer = pipeline('text2text-generation', model='describeai/gemini')
|
| 40 |
code = "print('hello world!')"
|
| 41 |
|
| 42 |
-
response =
|
| 43 |
-
print(response)
|
| 44 |
|
| 45 |
```
|
| 46 |
|
|
|
|
| 39 |
summarizer = pipeline('text2text-generation', model='describeai/gemini')
|
| 40 |
code = "print('hello world!')"
|
| 41 |
|
| 42 |
+
response = summarizer(code, max_length=100, num_beams=3)
|
| 43 |
+
print("Summarized code: " + response[0]['generated_text'])
|
| 44 |
|
| 45 |
```
|
| 46 |
|