Update README.md
Browse files
README.md
CHANGED
@@ -92,6 +92,29 @@ It achieves the following results on the evaluation set:
|
|
92 |
- intended use: "text completion" of partially written emails
|
93 |
|
94 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
|
96 |
---
|
97 |
|
|
|
92 |
- intended use: "text completion" of partially written emails
|
93 |
|
94 |
|
95 |
+
## Usage example
|
96 |
+
|
97 |
+
|
98 |
+
|
99 |
+
```python
|
100 |
+
from transformers import pipeline
|
101 |
+
|
102 |
+
model_tag = "postbot/emailgen-pythia-410m-deduped"
|
103 |
+
generator = pipeline(
|
104 |
+
"text-generation",
|
105 |
+
model=model_tag,
|
106 |
+
)
|
107 |
+
|
108 |
+
prompt = """
|
109 |
+
Hello,
|
110 |
+
|
111 |
+
Following up on the bubblegum shipment."""
|
112 |
+
|
113 |
+
result = generator(
|
114 |
+
prompt,
|
115 |
+
) # generate
|
116 |
+
print(result[0]["generated_text"])
|
117 |
+
```
|
118 |
|
119 |
---
|
120 |
|