Spaces:
Runtime error
Runtime error
Commit
•
218b69c
1
Parent(s):
d6f8b87
Update app.py
Browse files
app.py
CHANGED
@@ -26,9 +26,9 @@ restart_thread.start()
|
|
26 |
queue = Queue()
|
27 |
queue_threshold = 100
|
28 |
|
29 |
-
def add_random_noise(prompt, noise_level=0.
|
30 |
if noise_level == 0:
|
31 |
-
noise_level = 0.
|
32 |
# Get the percentage of characters to add as noise
|
33 |
percentage_noise = noise_level * 5
|
34 |
# Get the number of characters to add as noise
|
@@ -77,38 +77,6 @@ def send_it2(inputs, noise_level, proc1=proc1):
|
|
77 |
#output4 = proc1(prompt_with_noise)
|
78 |
#return output4
|
79 |
|
80 |
-
#def send_it5(inputs, noise_level, proc1=proc1):
|
81 |
-
#prompt_with_noise = add_random_noise(inputs, noise_level)
|
82 |
-
#while queue.qsize() >= queue_threshold:
|
83 |
-
#time.sleep(2)
|
84 |
-
#queue.put(prompt_with_noise)
|
85 |
-
#output5 = proc1(prompt_with_noise)
|
86 |
-
#return output5
|
87 |
-
|
88 |
-
#def send_it6(inputs, noise_level, proc1=proc1):
|
89 |
-
#prompt_with_noise = add_random_noise(inputs, noise_level)
|
90 |
-
#while queue.qsize() >= queue_threshold:
|
91 |
-
#time.sleep(2)
|
92 |
-
#queue.put(prompt_with_noise)
|
93 |
-
#output6 = proc1(prompt_with_noise)
|
94 |
-
#return output6
|
95 |
-
|
96 |
-
#def send_it7(inputs, noise_level, proc1=proc1):
|
97 |
-
#prompt_with_noise = add_random_noise(inputs, noise_level)
|
98 |
-
#while queue.qsize() >= queue_threshold:
|
99 |
-
#time.sleep(2)
|
100 |
-
#queue.put(prompt_with_noise)
|
101 |
-
#output7 = proc1(prompt_with_noise)
|
102 |
-
#return output7
|
103 |
-
|
104 |
-
#def send_it8(inputs, noise_level, proc1=proc1):
|
105 |
-
#prompt_with_noise = add_random_noise(inputs, noise_level)
|
106 |
-
#while queue.qsize() >= queue_threshold:
|
107 |
-
#time.sleep(2)
|
108 |
-
#queue.put(prompt_with_noise)
|
109 |
-
#output8 = proc1(prompt_with_noise)
|
110 |
-
#return output8
|
111 |
-
|
112 |
|
113 |
with gr.Blocks(css='style.css') as demo:
|
114 |
gr.HTML(
|
@@ -161,8 +129,6 @@ with gr.Blocks(css='style.css') as demo:
|
|
161 |
output1=gr.Image(label="Dreamlike Diffusion 1.0",show_label=False)
|
162 |
output2=gr.Image(label="Dreamlike Diffusion 1.0",show_label=False)
|
163 |
|
164 |
-
#with gr.Row():
|
165 |
-
#output1=gr.Image()
|
166 |
|
167 |
see_prompts.click(get_prompts, inputs=[input_text], outputs=[prompt], queue=False)
|
168 |
run.click(send_it1, inputs=[prompt, noise_level], outputs=[output1])
|
|
|
26 |
queue = Queue()
|
27 |
queue_threshold = 100
|
28 |
|
29 |
+
def add_random_noise(prompt, noise_level=0.00):
|
30 |
if noise_level == 0:
|
31 |
+
noise_level = 0.00
|
32 |
# Get the percentage of characters to add as noise
|
33 |
percentage_noise = noise_level * 5
|
34 |
# Get the number of characters to add as noise
|
|
|
77 |
#output4 = proc1(prompt_with_noise)
|
78 |
#return output4
|
79 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
|
81 |
with gr.Blocks(css='style.css') as demo:
|
82 |
gr.HTML(
|
|
|
129 |
output1=gr.Image(label="Dreamlike Diffusion 1.0",show_label=False)
|
130 |
output2=gr.Image(label="Dreamlike Diffusion 1.0",show_label=False)
|
131 |
|
|
|
|
|
132 |
|
133 |
see_prompts.click(get_prompts, inputs=[input_text], outputs=[prompt], queue=False)
|
134 |
run.click(send_it1, inputs=[prompt, noise_level], outputs=[output1])
|