Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -24,10 +24,20 @@ def query2(fetch_url):
|
|
24 |
response = requests.get(API_URL2)
|
25 |
return response.json()
|
26 |
|
27 |
-
|
|
|
|
|
28 |
with gr.Blocks() as app:
|
29 |
-
|
30 |
-
|
31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
fetch_btn.click(query2,data_set_url,out_json)
|
33 |
app.launch()
|
|
|
24 |
response = requests.get(API_URL2)
|
25 |
return response.json()
|
26 |
|
27 |
+
def find_fn(inp,out_json):
|
28 |
+
print (inp)
|
29 |
+
return(f'{out_json}{inp}')
|
30 |
with gr.Blocks() as app:
|
31 |
+
with gr.Row():
|
32 |
+
data_set_url=gr.Textbox()
|
33 |
+
fetch_btn=gr.Button()
|
34 |
+
with gr.Row():
|
35 |
+
find_string=gr.Textbox()
|
36 |
+
find_btn=gr.Button("Search")
|
37 |
+
with gr.Row():
|
38 |
+
out_json = gr.JSON()
|
39 |
+
out_find = gr.Textbox()
|
40 |
+
|
41 |
+
find_btn.click(find_fn,[find_string,out_json],out_find)
|
42 |
fetch_btn.click(query2,data_set_url,out_json)
|
43 |
app.launch()
|