Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import requests
|
2 |
+
import gradio as gr
|
3 |
+
|
4 |
+
def get_api(inp):
|
5 |
+
r = requests.get(f'{inp}')
|
6 |
+
print (r)
|
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()
|