Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -375,11 +375,12 @@ def run(state, drawpad):
|
|
375 |
bootstrap_steps=opt.bootstrap_steps,
|
376 |
guidance_scale=0,
|
377 |
)
|
|
|
378 |
|
379 |
-
buffered = BytesIO()
|
380 |
-
image.save(buffered, format="JPEG")
|
381 |
-
img_str = base64.b64encode(buffered.getvalue())
|
382 |
-
return image, img_str
|
383 |
|
384 |
|
385 |
|
@@ -715,11 +716,11 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
715 |
# scale=1,
|
716 |
elem_id='run-button'
|
717 |
)
|
718 |
-
with gr.Group(elem_id='share-btn-container'):
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
|
724 |
iface.model_select = gr.Radio(
|
725 |
list(model_dict.keys()),
|
@@ -832,7 +833,8 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
832 |
iface.btn_generate.click(
|
833 |
fn=run,
|
834 |
inputs=[state, iface.ctrl_semantic],
|
835 |
-
outputs=[iface.image_slot, iface.image_b64],
|
|
|
836 |
api_name='run',
|
837 |
)
|
838 |
|
|
|
375 |
bootstrap_steps=opt.bootstrap_steps,
|
376 |
guidance_scale=0,
|
377 |
)
|
378 |
+
return image
|
379 |
|
380 |
+
# buffered = BytesIO()
|
381 |
+
# image.save(buffered, format="JPEG")
|
382 |
+
# img_str = base64.b64encode(buffered.getvalue())
|
383 |
+
# return image, img_str
|
384 |
|
385 |
|
386 |
|
|
|
716 |
# scale=1,
|
717 |
elem_id='run-button'
|
718 |
)
|
719 |
+
# with gr.Group(elem_id='share-btn-container'):
|
720 |
+
# gr.HTML(community_icon_html)
|
721 |
+
# gr.HTML(loading_icon_html)
|
722 |
+
# iface.btn_share = gr.Button('Share with Community', elem_id='share-btn')
|
723 |
+
# iface.image_b64 = gr.Textbox(elem_id='output-b64')
|
724 |
|
725 |
iface.model_select = gr.Radio(
|
726 |
list(model_dict.keys()),
|
|
|
833 |
iface.btn_generate.click(
|
834 |
fn=run,
|
835 |
inputs=[state, iface.ctrl_semantic],
|
836 |
+
# outputs=[iface.image_slot, iface.image_b64],
|
837 |
+
outputs=iface.image_slot,
|
838 |
api_name='run',
|
839 |
)
|
840 |
|