raphael825 commited on
Commit
7ae58b6
·
1 Parent(s): e76cd4a

Add the Json

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -1,8 +1,11 @@
 
1
  import gradio as gr
2
 
3
 
4
  def greet(name):
5
- return "Hello " + name + "!!!"
 
 
6
 
7
 
8
  iface = gr.Interface(fn=greet, inputs="text", outputs="text")
 
1
+ import gradio
2
  import gradio as gr
3
 
4
 
5
  def greet(name):
6
+ test = gradio.JSON("data/book.json")
7
+ test_txt = test["title"]
8
+ return "Hello " + name + test_txt + "!!!"
9
 
10
 
11
  iface = gr.Interface(fn=greet, inputs="text", outputs="text")