yizhangliu commited on
Commit
32d9c0d
1 Parent(s): 6f02b4f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -227,8 +227,8 @@ def predict(input):
227
 
228
  css = '''
229
  .container {max-width: 1150px;margin: auto;padding-top: 1.5rem}
230
- image_upload{min-height:512px}
231
- image_upload [data-testid="image"], #image_upload [data-testid="image"] > div{min-height: 512px}
232
  #mask_radio .gr-form{background:transparent; border: none}
233
  #word_mask{margin-top: .75em !important}
234
  #word_mask textarea:disabled{opacity: 0.3}
@@ -322,8 +322,8 @@ with image_blocks as demo:
322
  full_width=True,
323
  )
324
 
325
- # with gr.Column():
326
- image_out = gr.Image(label="Output", elem_id="image_output", visible=False) #.style(height=512)
327
  '''
328
  with gr.Group(elem_id="share-btn-container"):
329
  community_icon = gr.HTML(community_icon_html, visible=False)
@@ -334,7 +334,7 @@ with image_blocks as demo:
334
 
335
 
336
  # btn.click(fn=predict, inputs=[image, prompt], outputs=[image_out, community_icon, loading_icon, share_button])
337
- btn_in.click(fn=predict, inputs=[image], outputs=[image]) #, community_icon, loading_icon, share_button])
338
  #share_button.click(None, [], [], _js=share_js)
339
 
340
 
 
227
 
228
  css = '''
229
  .container {max-width: 1150px;margin: auto;padding-top: 1.5rem}
230
+ #image_upload{min-height:512px}
231
+ #image_upload [data-testid="image"], #image_upload [data-testid="image"] > div{min-height: 512px}
232
  #mask_radio .gr-form{background:transparent; border: none}
233
  #word_mask{margin-top: .75em !important}
234
  #word_mask textarea:disabled{opacity: 0.3}
 
322
  full_width=True,
323
  )
324
 
325
+ with gr.Column():
326
+ image_out = gr.Image(label="Output", elem_id="image_output", visible=True) #.style(height=512)
327
  '''
328
  with gr.Group(elem_id="share-btn-container"):
329
  community_icon = gr.HTML(community_icon_html, visible=False)
 
334
 
335
 
336
  # btn.click(fn=predict, inputs=[image, prompt], outputs=[image_out, community_icon, loading_icon, share_button])
337
+ btn_in.click(fn=predict, inputs=[image], outputs=[image_out]) #, community_icon, loading_icon, share_button])
338
  #share_button.click(None, [], [], _js=share_js)
339
 
340