milyiyo's picture
Update app.py
52b6a47
raw
history blame
801 Bytes
import gradio as gr
def make_poem(author, sentiment, words, text):
return [author, sentiment, words, text]
iface = gr.Interface(
fn=make_poem,
inputs=
[
# gr.inputs.Textbox(lines=1, placeholder='autor', default="", label=None),
gr.inputs.Dropdown(['Pepe', 'Juan'], type="value", label='Nombre del autor'),
gr.inputs.Radio(['positivo', 'negativo'], type="value", label='Sentimiento del texto generado'),
gr.inputs.Textbox(lines=1, placeholder='palabra_1, palabra_2, ..., palabra_n', label='Palabras que desea incluir'),
gr.inputs.Textbox(lines=4, placeholder='texto inicial', label='Texto inicial'),
],
outputs="text",
examples=
[
['Pablo Neruda', 'positivo', 'cielo, luna, mar', 'Todos fueron a verle pasar']
])
iface.launch()