File size: 373 Bytes
31fbf83
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import gradio as gr

def question_answer(question, answer):
    return ("You asked: " + question, "The answer is: " + answer)

iface = gr.Interface(fn=question_answer,
                     inputs=["textarea", "text"],
                     outputs=["textbox", "text"],
                     layout="vertical",
                     title="Question and Answer")

iface.launch()