Update README.md
Browse files
README.md
CHANGED
|
@@ -43,9 +43,16 @@ Before running any generated code, it’s always a good idea to check how the pr
|
|
| 43 |
|
| 44 |
[More Information Needed]
|
| 45 |
|
| 46 |
-
##
|
| 47 |
|
| 48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
[More Information Needed]
|
| 51 |
|
|
|
|
| 43 |
|
| 44 |
[More Information Needed]
|
| 45 |
|
| 46 |
+
## Quick start
|
| 47 |
|
| 48 |
+
```python
|
| 49 |
+
from transformers import pipeline
|
| 50 |
+
|
| 51 |
+
question = "Write me a Fortran program that, given an array of real numbers from stdin, prints the average."
|
| 52 |
+
generator = pipeline("text-generation", model="GiuLeo01/FortranCodeGen-3b-SynthData", device="cuda")
|
| 53 |
+
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
| 54 |
+
print(output["generated_text"])
|
| 55 |
+
```
|
| 56 |
|
| 57 |
[More Information Needed]
|
| 58 |
|