Teja-Gollapudi
commited on
Commit
•
80a744c
1
Parent(s):
5b5b084
Update README.md
Browse files
README.md
CHANGED
@@ -28,13 +28,27 @@ While the base Flan-T5 model is open-sourced under Apache 2.0, the licensing is
|
|
28 |
|
29 |
# How to Use
|
30 |
|
31 |
-
|
32 |
from transformers import pipeline
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
|
35 |
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
|
|
|
|
|
|
|
|
|
38 |
|
39 |
# Training Details
|
40 |
|
|
|
28 |
|
29 |
# How to Use
|
30 |
|
31 |
+
```
|
32 |
from transformers import pipeline
|
33 |
+
model = pipeline(model="vmware/alpaca-flan-t5-large",device_map = 'auto')
|
34 |
+
|
35 |
+
prompt = "Give me the recipe for making a caramel flan"
|
36 |
+
output = model(prompt, max_length=256, do_sample=True)
|
37 |
+
|
38 |
|
39 |
|
40 |
|
41 |
+
'''
|
42 |
+
[{'generated_text': 'Recipe for making caramel flan: 2 cups all-purpose flour 3 cups butter 6 tablespoons sugar 2 tablespoons melted dark chocolate 2 cups milk Instructions: 1.
|
43 |
+
Preheat oven to 350°F (180°C). 2. Grease 9 inch round cake pan. 3. In a large bowl, whisk together flour, baking powder, cocoa powder, salt and salt.
|
44 |
+
4. Beat until fluffy. 5. Add the melted chocolate, vanilla and sugar and beat until blended. 6. Pour batter into the prepared pan and bake for 45 minutes.
|
45 |
+
7. Remove the pan from the oven and let cool before serving.'}]
|
46 |
|
47 |
|
48 |
+
'''
|
49 |
+
|
50 |
+
|
51 |
+
```
|
52 |
|
53 |
# Training Details
|
54 |
|