Ekittl01 commited on
Commit
31fbf83
1 Parent(s): b4768a2

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

Files changed (1) hide show
  1. gr +12 -0
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()