Update app.py
Browse files
app.py
CHANGED
|
@@ -3,10 +3,11 @@ import gradio as gr
|
|
| 3 |
|
| 4 |
def get_api(inp):
|
| 5 |
r = requests.get(f'{inp}')
|
| 6 |
-
|
| 7 |
|
| 8 |
with gr.Blocks() as app:
|
| 9 |
inp=gr.Textbox()
|
| 10 |
btn=gr.Button()
|
| 11 |
-
|
|
|
|
| 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()
|