gokaygokay
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -12,6 +12,15 @@ pipeline_tag: text2text-generation
|
|
12 |
```python
|
13 |
from transformers import pipeline
|
14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
enhancer = pipeline('text2text-generation', model=model, tokenizer=tokenizer, repetition_penalty=1.5, device="cuda")
|
16 |
max_target_length = 256
|
17 |
prefix = "enhance prompt: "
|
|
|
12 |
```python
|
13 |
from transformers import pipeline
|
14 |
|
15 |
+
# Model checkpoint
|
16 |
+
model_checkpoint = "gokaygokay/Flux-Prompt-Enhance"
|
17 |
+
|
18 |
+
# Tokenizer
|
19 |
+
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
|
20 |
+
|
21 |
+
# Model
|
22 |
+
model = AutoModelForSeq2SeqLM.from_pretrained(model_checkpoint)
|
23 |
+
|
24 |
enhancer = pipeline('text2text-generation', model=model, tokenizer=tokenizer, repetition_penalty=1.5, device="cuda")
|
25 |
max_target_length = 256
|
26 |
prefix = "enhance prompt: "
|