Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -99,6 +99,14 @@ def send_it5(inputs, noise_level, proc1=proc1):
|
|
99 |
output5 = proc1(prompt_with_noise)
|
100 |
return output5
|
101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
|
103 |
with gr.Blocks(css='style.css') as demo:
|
104 |
gr.HTML(
|
@@ -146,7 +154,7 @@ with gr.Blocks(css='style.css') as demo:
|
|
146 |
with gr.Row():
|
147 |
with gr.Row():
|
148 |
#Now that the first box generates a picture with noise=0 having the default at 0 makes no sense as it'd generate the same image 6 times.
|
149 |
-
noise_level = gr.Slider(minimum=0.
|
150 |
with gr.Row():
|
151 |
with gr.Row():
|
152 |
output1=gr.Image(label="Dreamlike Anime 1.0",show_label=False)
|
@@ -158,6 +166,7 @@ with gr.Blocks(css='style.css') as demo:
|
|
158 |
with gr.Row():
|
159 |
with gr.Row():
|
160 |
output5=gr.Image(label="Dreamlike Anime 1.0",show_label=False)
|
|
|
161 |
|
162 |
see_prompts.click(get_prompts, inputs=[input_text], outputs=[prompt], queue=False)
|
163 |
run.click(send_it1, inputs=[prompt, noise_level], outputs=[output1])
|
@@ -165,6 +174,7 @@ with gr.Blocks(css='style.css') as demo:
|
|
165 |
run.click(send_it3, inputs=[prompt, noise_level], outputs=[output3])
|
166 |
run.click(send_it4, inputs=[prompt, noise_level], outputs=[output4])
|
167 |
run.click(send_it5, inputs=[prompt, noise_level], outputs=[output5])
|
|
|
168 |
|
169 |
with gr.Row():
|
170 |
gr.HTML(
|
|
|
99 |
output5 = proc1(prompt_with_noise)
|
100 |
return output5
|
101 |
|
102 |
+
def send_it6(inputs, noise_level, proc1=proc1):
|
103 |
+
prompt_with_noise = add_random_noise(inputs, noise_level)
|
104 |
+
while queue.qsize() >= queue_threshold:
|
105 |
+
time.sleep(2)
|
106 |
+
queue.put(prompt_with_noise)
|
107 |
+
output5 = proc1(prompt_with_noise)
|
108 |
+
return output6
|
109 |
+
|
110 |
|
111 |
with gr.Blocks(css='style.css') as demo:
|
112 |
gr.HTML(
|
|
|
154 |
with gr.Row():
|
155 |
with gr.Row():
|
156 |
#Now that the first box generates a picture with noise=0 having the default at 0 makes no sense as it'd generate the same image 6 times.
|
157 |
+
noise_level = gr.Slider(minimum=0.2, maximum=3, step=0.1, label="Noise Level (0.1 or less was generating the same pic 6 times! 🤣)")
|
158 |
with gr.Row():
|
159 |
with gr.Row():
|
160 |
output1=gr.Image(label="Dreamlike Anime 1.0",show_label=False)
|
|
|
166 |
with gr.Row():
|
167 |
with gr.Row():
|
168 |
output5=gr.Image(label="Dreamlike Anime 1.0",show_label=False)
|
169 |
+
output6=gr.Image(label="Dreamlike Anime 1.0",show_label=False)
|
170 |
|
171 |
see_prompts.click(get_prompts, inputs=[input_text], outputs=[prompt], queue=False)
|
172 |
run.click(send_it1, inputs=[prompt, noise_level], outputs=[output1])
|
|
|
174 |
run.click(send_it3, inputs=[prompt, noise_level], outputs=[output3])
|
175 |
run.click(send_it4, inputs=[prompt, noise_level], outputs=[output4])
|
176 |
run.click(send_it5, inputs=[prompt, noise_level], outputs=[output5])
|
177 |
+
run.click(send_it6, inputs=[prompt, noise_level], outputs=[output6])
|
178 |
|
179 |
with gr.Row():
|
180 |
gr.HTML(
|