Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -57,7 +57,7 @@ def add_random_noise(prompt, noise_level=0.00):
|
|
57 |
noise_chars.extend(['๐', 'beautiful', '๐', '๐ค', '๐', '๐ค', '๐ญ', '๐', 'pretty', '๐คฏ', '๐คซ', '๐ฅด', 'sitting', '๐คฉ', '๐ฅณ', '๐', '๐ฉ', '๐คช', '๐', 'retro', '๐', '๐น', 'masterpiece', '๐ค', '๐ฝ', 'high quality', '๐', '๐
', '๐', '๐', '๐', '๐', '๐', '๐', '๐ฎ', 'โค๏ธ', '๐', '๐', '๐', '๐', '๐ถ', '๐ฑ', 'visible', '๐น', '๐ฆ', '๐ป', '๐จ', '๐ฏ', '๐ฆ', '๐', '๐ฅ', '๐ง๏ธ', '๐', '๐', '๐ฅ', '๐ด', '๐', '๐บ', '๐ป', '๐ธ', '๐จ', '๐
', '๐', 'โ๏ธ', 'โ๏ธ', 'โ๏ธ', 'โ๏ธ', '๐ค๏ธ', 'โ
๏ธ', '๐ฅ๏ธ', '๐ฆ๏ธ', '๐ง๏ธ', '๐ฉ๏ธ', '๐จ๏ธ', '๐ซ๏ธ', 'โ๏ธ', '๐ฌ๏ธ', '๐จ', '๐ช๏ธ', 'beautiful'])
|
58 |
for index in noise_indices:
|
59 |
prompt_list[index] = random.choice(noise_chars)
|
60 |
-
return "
|
61 |
|
62 |
#Give varied output even at noise level 0
|
63 |
def add_random_noise3(prompt, noise_level=0.00):
|
@@ -71,7 +71,7 @@ def add_random_noise3(prompt, noise_level=0.00):
|
|
71 |
noise_chars.extend(['๐', 'beautiful', '๐', '๐ค', '๐', '๐ค', '๐ญ', '๐', 'pretty', '๐คฏ', '๐คซ', '๐ฅด', 'sitting', '๐คฉ', '๐ฅณ', '๐', '๐ฉ', '๐คช', '๐', 'retro', '๐', '๐น', 'masterpiece', '๐ค', '๐ฝ', 'high quality', '๐', '๐
', '๐', '๐', '๐', '๐', '๐', '๐', '๐ฎ', 'โค๏ธ', '๐', '๐', '๐', '๐', '๐ถ', '๐ฑ', 'visible', '๐น', '๐ฆ', '๐ป', '๐จ', '๐ฏ', '๐ฆ', '๐', '๐ฅ', '๐ง๏ธ', '๐', '๐', '๐ฅ', '๐ด', '๐', '๐บ', '๐ป', '๐ธ', '๐จ', '๐
', '๐', 'โ๏ธ', 'โ๏ธ', 'โ๏ธ', 'โ๏ธ', '๐ค๏ธ', 'โ
๏ธ', '๐ฅ๏ธ', '๐ฆ๏ธ', '๐ง๏ธ', '๐ฉ๏ธ', '๐จ๏ธ', '๐ซ๏ธ', 'โ๏ธ', '๐ฌ๏ธ', '๐จ', '๐ช๏ธ', 'beautiful'])
|
72 |
for index in noise_indices:
|
73 |
prompt_list[index] = random.choice(noise_chars)
|
74 |
-
return "
|
75 |
|
76 |
def send_it1(inputs, noise_level, proc1=proc1):
|
77 |
prompt_with_noise = noadd_random_noise(inputs, noise_level)
|
@@ -151,7 +151,8 @@ with gr.Blocks(css='style.css') as demo:
|
|
151 |
|
152 |
with gr.Row():
|
153 |
with gr.Row():
|
154 |
-
|
|
|
155 |
with gr.Row():
|
156 |
with gr.Row():
|
157 |
output1=gr.Image(label="Dreamlike Anime 1.0",show_label=False)
|
|
|
57 |
noise_chars.extend(['๐', 'beautiful', '๐', '๐ค', '๐', '๐ค', '๐ญ', '๐', 'pretty', '๐คฏ', '๐คซ', '๐ฅด', 'sitting', '๐คฉ', '๐ฅณ', '๐', '๐ฉ', '๐คช', '๐', 'retro', '๐', '๐น', 'masterpiece', '๐ค', '๐ฝ', 'high quality', '๐', '๐
', '๐', '๐', '๐', '๐', '๐', '๐', '๐ฎ', 'โค๏ธ', '๐', '๐', '๐', '๐', '๐ถ', '๐ฑ', 'visible', '๐น', '๐ฆ', '๐ป', '๐จ', '๐ฏ', '๐ฆ', '๐', '๐ฅ', '๐ง๏ธ', '๐', '๐', '๐ฅ', '๐ด', '๐', '๐บ', '๐ป', '๐ธ', '๐จ', '๐
', '๐', 'โ๏ธ', 'โ๏ธ', 'โ๏ธ', 'โ๏ธ', '๐ค๏ธ', 'โ
๏ธ', '๐ฅ๏ธ', '๐ฆ๏ธ', '๐ง๏ธ', '๐ฉ๏ธ', '๐จ๏ธ', '๐ซ๏ธ', 'โ๏ธ', '๐ฌ๏ธ', '๐จ', '๐ช๏ธ', 'beautiful'])
|
58 |
for index in noise_indices:
|
59 |
prompt_list[index] = random.choice(noise_chars)
|
60 |
+
return "".join(prompt_list)
|
61 |
|
62 |
#Give varied output even at noise level 0
|
63 |
def add_random_noise3(prompt, noise_level=0.00):
|
|
|
71 |
noise_chars.extend(['๐', 'beautiful', '๐', '๐ค', '๐', '๐ค', '๐ญ', '๐', 'pretty', '๐คฏ', '๐คซ', '๐ฅด', 'sitting', '๐คฉ', '๐ฅณ', '๐', '๐ฉ', '๐คช', '๐', 'retro', '๐', '๐น', 'masterpiece', '๐ค', '๐ฝ', 'high quality', '๐', '๐
', '๐', '๐', '๐', '๐', '๐', '๐', '๐ฎ', 'โค๏ธ', '๐', '๐', '๐', '๐', '๐ถ', '๐ฑ', 'visible', '๐น', '๐ฆ', '๐ป', '๐จ', '๐ฏ', '๐ฆ', '๐', '๐ฅ', '๐ง๏ธ', '๐', '๐', '๐ฅ', '๐ด', '๐', '๐บ', '๐ป', '๐ธ', '๐จ', '๐
', '๐', 'โ๏ธ', 'โ๏ธ', 'โ๏ธ', 'โ๏ธ', '๐ค๏ธ', 'โ
๏ธ', '๐ฅ๏ธ', '๐ฆ๏ธ', '๐ง๏ธ', '๐ฉ๏ธ', '๐จ๏ธ', '๐ซ๏ธ', 'โ๏ธ', '๐ฌ๏ธ', '๐จ', '๐ช๏ธ', 'beautiful'])
|
72 |
for index in noise_indices:
|
73 |
prompt_list[index] = random.choice(noise_chars)
|
74 |
+
return "".join(prompt_list)
|
75 |
|
76 |
def send_it1(inputs, noise_level, proc1=proc1):
|
77 |
prompt_with_noise = noadd_random_noise(inputs, noise_level)
|
|
|
151 |
|
152 |
with gr.Row():
|
153 |
with gr.Row():
|
154 |
+
#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.
|
155 |
+
noise_level = gr.Slider(minimum=0.1, maximum=3, step=0.1, label="Noise Level")
|
156 |
with gr.Row():
|
157 |
with gr.Row():
|
158 |
output1=gr.Image(label="Dreamlike Anime 1.0",show_label=False)
|