blitz_diffusion_builtin / prompt_extend.py
John6666's picture
Upload 2 files
44b7702 verified
raw
history blame
210 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"]