Omnibus commited on
Commit
fb8bd23
1 Parent(s): 4435696

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -3,10 +3,11 @@ import gradio as gr
3
 
4
  def get_api(inp):
5
  r = requests.get(f'{inp}')
6
- print (r.content)
7
 
8
  with gr.Blocks() as app:
9
  inp=gr.Textbox()
10
  btn=gr.Button()
11
- btn.click(get_api,inp,None)
 
12
  app.launch()
 
3
 
4
  def get_api(inp):
5
  r = requests.get(f'{inp}')
6
+ return (r.content)
7
 
8
  with gr.Blocks() as app:
9
  inp=gr.Textbox()
10
  btn=gr.Button()
11
+ outp=gr.JSON()
12
+ btn.click(get_api,inp,outp)
13
  app.launch()