ncoop57 commited on
Commit
1a5e5f8
1 Parent(s): 637fdc5
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -1,13 +1,15 @@
 
 
1
  import gradio as gr
2
 
3
- def greet(name):
4
  res = {
5
- "content": event["body"],
6
  "questions": ["what is life?", "hi?"],
7
  "answers": ["42", "hola!"]
8
  }
9
- return res
10
  #"Hello " + name + "!!"
11
 
12
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
13
  iface.launch()
 
1
+ import json
2
+
3
  import gradio as gr
4
 
5
+ def cardify(content):
6
  res = {
7
+ "content": content,
8
  "questions": ["what is life?", "hi?"],
9
  "answers": ["42", "hola!"]
10
  }
11
+ return json.dumps(res)
12
  #"Hello " + name + "!!"
13
 
14
+ iface = gr.Interface(fn=cardify, inputs="text", outputs="text")
15
  iface.launch()