Update README.md
Browse files
README.md
CHANGED
@@ -11,6 +11,24 @@ model-index:
|
|
11 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
12 |
should probably proofread and complete it, then remove this comment. -->
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
# checkpoint
|
15 |
|
16 |
This model is a fine-tuned version of [google/t5-efficient-base](https://huggingface.co/google/t5-efficient-base) on an unknown dataset.
|
|
|
11 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
12 |
should probably proofread and complete it, then remove this comment. -->
|
13 |
|
14 |
+
# how to use the model
|
15 |
+
|
16 |
+
```
|
17 |
+
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
18 |
+
|
19 |
+
tokenizer = AutoTokenizer.from_pretrained("piazzola/test2")
|
20 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("piazzola/test2")
|
21 |
+
|
22 |
+
from transformers import pipeline
|
23 |
+
|
24 |
+
pipe = pipeline("text2text-generation", model="piazzola/test2")
|
25 |
+
|
26 |
+
sentence = "i left the keys in the car."
|
27 |
+
|
28 |
+
output = pipe(sentence, max_new_tokens=100, do_sample=True, temperature=0.1)
|
29 |
+
print(output)
|
30 |
+
```
|
31 |
+
|
32 |
# checkpoint
|
33 |
|
34 |
This model is a fine-tuned version of [google/t5-efficient-base](https://huggingface.co/google/t5-efficient-base) on an unknown dataset.
|