Spaces:
Running
Running
File size: 524 Bytes
5a61290 3a454bf 5a61290 a4c548f 5a61290 96a75e9 5a61290 62f15dd 5a61290 e4074de |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
from transformers import pipeline
import gradio as gr
pipe = pipeline('text-generation', model='daspartho/prompt-extend')
def extend_prompt(prompt):
return pipe(prompt+',', num_return_sequences=1)[0]["generated_text"]
iface = gr.Interface(
description = " ",
fn=extend_prompt,
inputs=gr.Text(label="Type the prompt here"),
outputs=gr.TextArea(label='Extended prompt'),
title=" ",
theme = gr.themes.Base(primary_hue="teal",secondary_hue="teal",neutral_hue="slate")
)
iface.launch()
|