NSFW-ToyWorld / prompt_extend.py
phenixrhyder's picture
Move to Gradio 4.x (#5)
0d49f29 verified
raw
history blame contribute delete
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"]