Omnibus commited on
Commit
ef02a4a
1 Parent(s): c7f74fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -4
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
- data_set_url=gr.Textbox()
30
- fetch_btn=gr.Button()
31
- out_json = gr.JSON()
 
 
 
 
 
 
 
 
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()