Create gr
Browse filesimport 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()
gr
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
def question_answer(question, answer):
|
4 |
+
return ("You asked: " + question, "The answer is: " + answer)
|
5 |
+
|
6 |
+
iface = gr.Interface(fn=question_answer,
|
7 |
+
inputs=["textarea", "text"],
|
8 |
+
outputs=["textbox", "text"],
|
9 |
+
layout="vertical",
|
10 |
+
title="Question and Answer")
|
11 |
+
|
12 |
+
iface.launch()
|