Omnibus commited on
Commit
3bb9701
1 Parent(s): 20cd113

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -28,8 +28,9 @@ def load_model(model_drop):
28
  def run_dif(prompt,im_path,model_drop,cnt):
29
  out_box=[]
30
 
31
- for ea in im_path:
32
  print(f'ea:: {ea}')
 
33
  #url = base_url+ea
34
  #init_image = load_image(url)
35
  init_image=load_image(ea)
@@ -185,10 +186,10 @@ with gr.Blocks(css=css) as app:
185
  model_drop=gr.Dropdown(label="Models", choices=models, type='index', value=models[0])
186
  cnt = gr.Number(value=1)
187
  out_html=gr.HTML()
188
- outp=gr.Gallery(type='filepath',columns=10)
189
  fingal=gr.Gallery(columns=10)
190
  im_list=gr.Textbox()
191
  im_btn.click(load_im,inp_im,[outp,im_list])
192
- go_btn = btn.click(run_dif,[inp,im_list,model_drop,cnt],[fingal,out_html])
193
  stop_btn.click(None,None,None,cancels=[go_btn])
194
  app.queue().launch()
 
28
  def run_dif(prompt,im_path,model_drop,cnt):
29
  out_box=[]
30
 
31
+ for i,ea in im_path:
32
  print(f'ea:: {ea}')
33
+ print(f'impath:: {im_path[0]}')
34
  #url = base_url+ea
35
  #init_image = load_image(url)
36
  init_image=load_image(ea)
 
186
  model_drop=gr.Dropdown(label="Models", choices=models, type='index', value=models[0])
187
  cnt = gr.Number(value=1)
188
  out_html=gr.HTML()
189
+ outp=gr.Gallery(columns=10)
190
  fingal=gr.Gallery(columns=10)
191
  im_list=gr.Textbox()
192
  im_btn.click(load_im,inp_im,[outp,im_list])
193
+ go_btn = btn.click(run_dif,[inp,outp,model_drop,cnt],[fingal,out_html])
194
  stop_btn.click(None,None,None,cancels=[go_btn])
195
  app.queue().launch()