gokaygokay
commited on
Commit
•
04ef620
1
Parent(s):
f4319e9
Update README.md
Browse files
README.md
CHANGED
@@ -13,6 +13,23 @@ model-index:
|
|
13 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
14 |
should probably proofread and complete it, then remove this comment. -->
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
# Lamini-Prompt-Enchance-Long
|
17 |
|
18 |
This model is a fine-tuned version of [MBZUAI/LaMini-Flan-T5-248M](https://huggingface.co/MBZUAI/LaMini-Flan-T5-248M) on an unknown dataset.
|
|
|
13 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
14 |
should probably proofread and complete it, then remove this comment. -->
|
15 |
|
16 |
+
# Usage
|
17 |
+
|
18 |
+
```python
|
19 |
+
from transformers import pipeline
|
20 |
+
|
21 |
+
# load model and tokenizer from huggingface hub with pipeline
|
22 |
+
enhancer = pipeline("summarization", model="gokaygokay/Lamini-Prompt-Enchance-Long", device=0)
|
23 |
+
|
24 |
+
prompt = "A blue-tinted bedroom scene, surreal and serene, with a mysterious reflected interior."
|
25 |
+
prefix = "Enhance the description: "
|
26 |
+
# enhance prompt
|
27 |
+
res = enhancer(prefix + prompt)
|
28 |
+
|
29 |
+
print(res[0]['summary_text'])
|
30 |
+
|
31 |
+
```
|
32 |
+
|
33 |
# Lamini-Prompt-Enchance-Long
|
34 |
|
35 |
This model is a fine-tuned version of [MBZUAI/LaMini-Flan-T5-248M](https://huggingface.co/MBZUAI/LaMini-Flan-T5-248M) on an unknown dataset.
|