Spaces:
Paused
Paused
Commit
•
b2c85ec
1
Parent(s):
cad6ebe
Update app.py
Browse files
app.py
CHANGED
@@ -80,7 +80,7 @@ with image_blocks as demo:
|
|
80 |
gr.HTML(read_content("header.html"))
|
81 |
with gr.Row():
|
82 |
with gr.Column():
|
83 |
-
image = gr.Image(source='upload', tool='sketch', elem_id="image_upload", type="pil", label="Upload"
|
84 |
with gr.Row(elem_id="prompt-container", mobile_collapse=False, equal_height=True):
|
85 |
with gr.Row():
|
86 |
prompt = gr.Textbox(placeholder="Your prompt (what you want in place of what is erased)", show_label=False, elem_id="prompt")
|
@@ -97,14 +97,15 @@ with image_blocks as demo:
|
|
97 |
scheduler = gr.Dropdown(label="Schedulers", choices=schedulers, value="EulerDiscreteScheduler")
|
98 |
|
99 |
with gr.Column():
|
100 |
-
image_out = gr.Image(label="Output", elem_id="output-img"
|
101 |
with gr.Group(elem_id="share-btn-container", visible=False) as share_btn_container:
|
102 |
community_icon = gr.HTML(community_icon_html)
|
103 |
loading_icon = gr.HTML(loading_icon_html)
|
104 |
share_button = gr.Button("Share to community", elem_id="share-btn",visible=True)
|
105 |
|
106 |
|
107 |
-
btn.click(fn=predict, inputs=[image, prompt, negative_prompt, guidance_scale, steps, strength, scheduler], outputs=[image_out, share_btn_container])
|
|
|
108 |
share_button.click(None, [], [], _js=share_js)
|
109 |
|
110 |
gr.Examples(
|
@@ -133,4 +134,4 @@ with image_blocks as demo:
|
|
133 |
"""
|
134 |
)
|
135 |
|
136 |
-
image_blocks.launch()
|
|
|
80 |
gr.HTML(read_content("header.html"))
|
81 |
with gr.Row():
|
82 |
with gr.Column():
|
83 |
+
image = gr.Image(source='upload', tool='sketch', elem_id="image_upload", type="pil", label="Upload",height=400)
|
84 |
with gr.Row(elem_id="prompt-container", mobile_collapse=False, equal_height=True):
|
85 |
with gr.Row():
|
86 |
prompt = gr.Textbox(placeholder="Your prompt (what you want in place of what is erased)", show_label=False, elem_id="prompt")
|
|
|
97 |
scheduler = gr.Dropdown(label="Schedulers", choices=schedulers, value="EulerDiscreteScheduler")
|
98 |
|
99 |
with gr.Column():
|
100 |
+
image_out = gr.Image(label="Output", elem_id="output-img", height=400)
|
101 |
with gr.Group(elem_id="share-btn-container", visible=False) as share_btn_container:
|
102 |
community_icon = gr.HTML(community_icon_html)
|
103 |
loading_icon = gr.HTML(loading_icon_html)
|
104 |
share_button = gr.Button("Share to community", elem_id="share-btn",visible=True)
|
105 |
|
106 |
|
107 |
+
btn.click(fn=predict, inputs=[image, prompt, negative_prompt, guidance_scale, steps, strength, scheduler], outputs=[image_out, share_btn_container], api_name='run')
|
108 |
+
prompt.submit(fn=predict, inputs=[image, prompt, negative_prompt, guidance_scale, steps, strength, scheduler], outputs=[image_out, share_btn_container])
|
109 |
share_button.click(None, [], [], _js=share_js)
|
110 |
|
111 |
gr.Examples(
|
|
|
134 |
"""
|
135 |
)
|
136 |
|
137 |
+
image_blocks.queue(max_size=25).launch()
|