rellow / app.py
rafacamargo's picture
feat: improve gradio UI
0a0b3f4
raw
history blame contribute delete
559 Bytes
import gradio as gr
from prediction import main
def infer(word1, word2, word3):
inputs = [word1, word2, word3]
result = main(inputs)
return result
demo = gr.Interface(
fn=infer,
inputs=[
gr.Textbox(label="First word"),
gr.Textbox(label="Second word"),
gr.Textbox(label="Third word"),
],
outputs=gr.Textbox(label="Generated Word + Definition"),
title="Rellow: Imaginary Word Generator",
description="Enter three words — the model generates an imaginary word and its definition."
)
demo.launch()