blitz_diffusion / prompt_extend.py
Yntec's picture
Create prompt_extend.py
814965a verified
raw
history blame
203 Bytes
from transformers import pipeline
pipe = pipeline('text-generation', model='daspartho/prompt-extend')
def extend_prompt(prompt):
return pipe(prompt+',', num_return_sequences=1)[0]["generated_text"]