| 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() |