Omnibus commited on
Commit
189d0fa
1 Parent(s): 33d94a9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -7
app.py CHANGED
@@ -127,11 +127,9 @@ with gr.Blocks() as app:
127
  gr.Column()
128
  with gr.Column():
129
 
130
- source_tog=gr.Radio(choices=["URL","Image","Video"],value="URL")
131
- with gr.Box(visible=True) as url_box:
132
- inp_url=gr.Textbox(label="Image URL")
133
- go_btn_url=gr.Button()
134
  with gr.Box(visible=False) as im_box:
 
135
  inp_im=gr.Image(label="Search Image",type='filepath')
136
  go_btn_im=gr.Button()
137
  with gr.Box(visible=False) as vid_box:
@@ -152,8 +150,6 @@ with gr.Blocks() as app:
152
  with gr.Row(visible=True):
153
  hid_box=gr.Textbox()
154
  def shuf(tog):
155
- if tog == "URL":
156
- return gr.update(visible=True),gr.update(visible=False),gr.update(visible=False)
157
  if tog == "Image":
158
  return gr.update(visible=False),gr.update(visible=True),gr.update(visible=False)
159
  if tog == "Video":
@@ -164,5 +160,5 @@ with gr.Blocks() as app:
164
  inp_im.change(process_im,inp_im,[inp_url])
165
  go_btn_vid.click(process_vid,[inp_vid,hid_box,every_n],[html_out,stat_box,hid_box])
166
  go_btn_im.click(rev_im,inp_url,[html_out])
167
- go_btn_url.click(rev_im,inp_url,[html_out])
168
  app.launch()
 
127
  gr.Column()
128
  with gr.Column():
129
 
130
+ source_tog=gr.Radio(choices=["Image","Video"],value="Image")
 
 
 
131
  with gr.Box(visible=False) as im_box:
132
+ inp_url=gr.Textbox(label="Image URL")
133
  inp_im=gr.Image(label="Search Image",type='filepath')
134
  go_btn_im=gr.Button()
135
  with gr.Box(visible=False) as vid_box:
 
150
  with gr.Row(visible=True):
151
  hid_box=gr.Textbox()
152
  def shuf(tog):
 
 
153
  if tog == "Image":
154
  return gr.update(visible=False),gr.update(visible=True),gr.update(visible=False)
155
  if tog == "Video":
 
160
  inp_im.change(process_im,inp_im,[inp_url])
161
  go_btn_vid.click(process_vid,[inp_vid,hid_box,every_n],[html_out,stat_box,hid_box])
162
  go_btn_im.click(rev_im,inp_url,[html_out])
163
+ #go_btn_url.click(rev_im,inp_url,[html_out])
164
  app.launch()