File size: 559 Bytes
e663138
 
 
 
 
 
 
 
 
 
 
0a0b3f4
 
 
e663138
 
 
0a0b3f4
e663138
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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()