File size: 221 Bytes
424fb3d
 
3c03595
424fb3d
 
 
 
1
2
3
4
5
6
7
8
from transformers import pipeline

pipe = pipeline('text-generation', model='Gustavosta/MagicPrompt-Stable-Diffusion')

def extend_prompt(prompt):
    return pipe(prompt+',', num_return_sequences=1)[0]["generated_text"]