tombetthauser commited on
Commit
d76094b
Β·
1 Parent(s): a50d0a2

Update app.py

Browse files

Try re-adding gradio columns to revert from final image error

Files changed (1) hide show
  1. app.py +13 -19
app.py CHANGED
@@ -378,31 +378,25 @@ with gr.Blocks(css=css) as demo:
378
  with gr.Row().style():
379
  infer_outputs = gr.Gallery(show_label=False, elem_id="generated-gallery").style(grid=[2], height="512px")
380
  with gr.Row():
381
- gr.HTML("<p style=\"font-size: 95%;margin-top: .75em\">Prompting may not work as you are used to. <code>objects</code> may need the concept added at the end, <code>styles</code> may work better at the beginning. You can navigate on <a href='https://lexica.art'>lexica.art</a> to get inspired on prompts</p>")
382
  with gr.Row():
383
  gr.Examples(examples=examples, fn=infer_examples, inputs=[text], outputs=infer_outputs, cache_examples=True)
384
- # with gr.Group(elem_id="share-btn-container"):
385
- # community_icon = gr.HTML(community_icon_html, visible=False)
386
- # loading_icon = gr.HTML(loading_icon_html, visible=False)
387
- # share_button = gr.Button("Share to community", elem_id="share-btn", visible=False)
388
- # checkbox_states = {}
389
- # inputs = [text]
390
- # btn.click(
391
- # infer,
392
- # inputs=inputs,
393
- # outputs=[infer_outputs, community_icon, loading_icon, share_button]
394
- # )
395
- # share_button.click(
396
- # None,
397
- # [],
398
- # [],
399
- # _js=share_js,
400
- # )
401
  checkbox_states = {}
402
  inputs = [text]
403
  btn.click(
404
  infer,
405
  inputs=inputs,
406
- outputs=[infer_outputs]
407
  )
 
 
 
 
 
 
 
408
  demo.queue(max_size=20).launch()
 
378
  with gr.Row().style():
379
  infer_outputs = gr.Gallery(show_label=False, elem_id="generated-gallery").style(grid=[2], height="512px")
380
  with gr.Row():
381
+ gr.HTML("<p></p>")
382
  with gr.Row():
383
  gr.Examples(examples=examples, fn=infer_examples, inputs=[text], outputs=infer_outputs, cache_examples=True)
384
+ with gr.Group(elem_id="share-btn-container"):
385
+ community_icon = gr.HTML(community_icon_html, visible=False)
386
+ loading_icon = gr.HTML(loading_icon_html, visible=False)
387
+ share_button = gr.Button("Share to community", elem_id="share-btn", visible=False)
 
 
 
 
 
 
 
 
 
 
 
 
 
388
  checkbox_states = {}
389
  inputs = [text]
390
  btn.click(
391
  infer,
392
  inputs=inputs,
393
+ outputs=[infer_outputs, community_icon, loading_icon, share_button]
394
  )
395
+ share_button.click(
396
+ None,
397
+ [],
398
+ [],
399
+ _js=share_js,
400
+ )
401
+
402
  demo.queue(max_size=20).launch()