File size: 239 Bytes
4543167
 
 
 
 
fb8bd23
4543167
 
 
 
fb8bd23
 
4543167
1
2
3
4
5
6
7
8
9
10
11
12
13
import requests
import gradio as gr

def get_api(inp):
    r = requests.get(f'{inp}')
    return (r.content)

with gr.Blocks() as app:
    inp=gr.Textbox()
    btn=gr.Button()
    outp=gr.JSON()
    btn.click(get_api,inp,outp)
app.launch()