Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -78,7 +78,9 @@ def send_it2(inputs, noise_level, proc1=proc1):
|
|
78 |
#output4 = proc1(prompt_with_noise)
|
79 |
#return output4
|
80 |
|
81 |
-
|
|
|
|
|
82 |
|
83 |
with gr.Blocks(css='style.css') as demo:
|
84 |
gr.HTML(
|
@@ -137,6 +139,12 @@ with gr.Blocks(css='style.css') as demo:
|
|
137 |
see_prompts.click(get_prompts, inputs=[input_text], outputs=[prompt], queue=False)
|
138 |
run.click(send_it1, inputs=[prompt, noise_level], outputs=[output1])
|
139 |
run.click(send_it2, inputs=[prompt, noise_level], outputs=[output2])
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
|
141 |
|
142 |
|
@@ -153,7 +161,6 @@ with gr.Blocks(css='style.css') as demo:
|
|
153 |
</div>
|
154 |
"""
|
155 |
)
|
156 |
-
btn.click(add, [num1, num2], output, api_name="addition")
|
157 |
|
158 |
demo.launch(enable_queue=True, inline=True)
|
159 |
block.queue(concurrency_count=100)
|
|
|
78 |
#output4 = proc1(prompt_with_noise)
|
79 |
#return output4
|
80 |
|
81 |
+
def identity_with_sleep(x):
|
82 |
+
time.sleep(0.5)
|
83 |
+
return x
|
84 |
|
85 |
with gr.Blocks(css='style.css') as demo:
|
86 |
gr.HTML(
|
|
|
139 |
see_prompts.click(get_prompts, inputs=[input_text], outputs=[prompt], queue=False)
|
140 |
run.click(send_it1, inputs=[prompt, noise_level], outputs=[output1])
|
141 |
run.click(send_it2, inputs=[prompt, noise_level], outputs=[output2])
|
142 |
+
|
143 |
+
with gr.Column():
|
144 |
+
input_img = gr.Image()
|
145 |
+
output_img = gr.Image()
|
146 |
+
submit_img = gr.Button()
|
147 |
+
submit_img.click(identity_with_sleep, input_img, output_img, api_name="img")
|
148 |
|
149 |
|
150 |
|
|
|
161 |
</div>
|
162 |
"""
|
163 |
)
|
|
|
164 |
|
165 |
demo.launch(enable_queue=True, inline=True)
|
166 |
block.queue(concurrency_count=100)
|