Omnibus commited on
Commit
988a321
·
verified ·
1 Parent(s): 6fd9dfb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -30,7 +30,7 @@ def get_concat_v_cut(in1, in2):
30
  dst = Image.new(
31
  'RGB', (min(im1.width, im2.width), im1.height + im2.height))
32
  dst.paste(im1, (0, 0))
33
- dst.paste(im2, (0, im1.height))
34
  return dst
35
 
36
 
@@ -68,11 +68,7 @@ def run_script(url: str, height: int, width: int):
68
  print (mes.text)
69
  if not (i%2):
70
  messages[i].screenshot(f'{i}-{uid}-tmp.png')
71
-
72
-
73
  messages[i+1].screenshot(f'{i+1}-{uid}-tmp.png')
74
-
75
-
76
  out_box.append(get_concat_v_cut(f'{i}-{uid}-tmp.png',f'{i+1}-{uid}-tmp.png'))
77
  print(f'out_box:: {out_box}')
78
  #mes_box.clear()
@@ -123,7 +119,9 @@ with gr.Blocks() as app:
123
  width=gr.Number(label="Width",value=800)
124
  message=gr.HTML('<center>Enter URL')
125
  with gr.Row():
 
 
126
  outim = gr.Image()
127
- outgal=gr.Gallery()
128
  btn.click(run_script,[inp,height,width],[outim,message,outgal])
129
  app.launch()
 
30
  dst = Image.new(
31
  'RGB', (min(im1.width, im2.width), im1.height + im2.height))
32
  dst.paste(im1, (0, 0))
33
+ dst.paste(im2, (0, im1.height+10))
34
  return dst
35
 
36
 
 
68
  print (mes.text)
69
  if not (i%2):
70
  messages[i].screenshot(f'{i}-{uid}-tmp.png')
 
 
71
  messages[i+1].screenshot(f'{i+1}-{uid}-tmp.png')
 
 
72
  out_box.append(get_concat_v_cut(f'{i}-{uid}-tmp.png',f'{i+1}-{uid}-tmp.png'))
73
  print(f'out_box:: {out_box}')
74
  #mes_box.clear()
 
119
  width=gr.Number(label="Width",value=800)
120
  message=gr.HTML('<center>Enter URL')
121
  with gr.Row():
122
+ with gr.Column():
123
+ outgal=gr.Gallery()
124
  outim = gr.Image()
125
+
126
  btn.click(run_script,[inp,height,width],[outim,message,outgal])
127
  app.launch()