Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -12,10 +12,10 @@ import emoji
|
|
12 |
text_gen=gr.Interface.load("spaces/phenomenon1981/MagicPrompt-Stable-Diffusion")
|
13 |
def get_prompts(prompt_text):
|
14 |
if prompt_text:
|
15 |
-
return text_gen(prompt_text + "
|
16 |
else:
|
17 |
return text_gen("")
|
18 |
-
proc1=gr.Interface.load("
|
19 |
|
20 |
def restart_script_periodically():
|
21 |
while True:
|
@@ -54,7 +54,7 @@ def add_random_noise(prompt, noise_level=0.00):
|
|
54 |
noise_indices = random.sample(range(len(prompt)), num_noise_chars)
|
55 |
prompt_list = list(prompt)
|
56 |
noise_chars = list(string.ascii_letters + string.punctuation + ' ' + string.digits)
|
57 |
-
noise_chars.extend(['๐', 'beautiful', '๐', '๐ค', '๐', '๐ค', '๐ญ', '๐', 'pretty', '๐คฏ', '๐คซ', '๐ฅด', 'sitting', '๐คฉ', '๐ฅณ', '๐', '๐ฉ', '๐คช', '๐', 'retro', '๐', '๐น', 'masterpiece', '๐ค', '๐ฝ', 'high quality', '๐', '๐
', '๐', '๐', '๐', '๐', '๐', '๐', '๐ฎ', 'โค๏ธ', '๐', '๐', '๐', '๐', '๐ถ', '๐ฑ', 'visible', '๐น', '๐ฆ', '๐ป', '๐จ', '๐ฏ', '๐ฆ', '๐', '๐ฅ', '๐ง๏ธ', '๐', '๐', '๐ฅ', '๐ด', '๐', '๐บ', '๐ป', '๐ธ', '๐จ', '๐
', '๐', 'โ๏ธ', 'โ๏ธ', 'โ๏ธ', 'โ๏ธ', '๐ค๏ธ', 'โ
๏ธ', '๐ฅ๏ธ', '๐ฆ๏ธ', '๐ง๏ธ', '๐ฉ๏ธ', '๐จ๏ธ', '๐ซ๏ธ', 'โ๏ธ', '๐ฌ๏ธ', '๐จ', '๐ช๏ธ', 'cute', 'kawaii', 'little'])
|
58 |
for index in noise_indices:
|
59 |
prompt_list[index] = random.choice(noise_chars)
|
60 |
return "".join(prompt_list)
|
@@ -131,11 +131,13 @@ with gr.Blocks(css='style.css') as demo:
|
|
131 |
}
|
132 |
</style>
|
133 |
<body>
|
134 |
-
<div class="center"><h1>
|
135 |
</div>
|
136 |
</body>
|
137 |
</div>
|
138 |
<p style="margin-bottom: 10px; color: #ffffff;">
|
|
|
|
|
139 |
If you have an idea, put it on the first box to expand it, if you have a full prompt, you can leave the first box empty and just put it on the second one and click generate images!
|
140 |
Noise Level: Controls how much randomness is added to the input of the boxes after the first one before it is sent to the model, so you can get 6 unique 768x768 images. Higher noise level produces more diverse outputs, while lower noise level produces similar outputs,
|
141 |
<a href="https://twitter.com/DavidJohnstonxx/">original space created by Phenomenon1981</a>.
|
@@ -176,19 +178,19 @@ with gr.Blocks(css='style.css') as demo:
|
|
176 |
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! ๐คฃ)")
|
177 |
with gr.Row():
|
178 |
with gr.Row():
|
179 |
-
output1=gr.Image(label="
|
180 |
-
output2=gr.Image(label="
|
181 |
with gr.Row():
|
182 |
with gr.Row():
|
183 |
-
output3=gr.Image(label="
|
184 |
-
output4=gr.Image(label="
|
185 |
with gr.Row():
|
186 |
with gr.Row():
|
187 |
-
output5=gr.Image(label="
|
188 |
-
outputX=gr.Image(label="
|
189 |
#with gr.Row():
|
190 |
#with gr.Row():
|
191 |
-
#output0=gr.Image(label="
|
192 |
|
193 |
see_prompts.click(get_prompts, inputs=[input_text], outputs=[prompt], queue=False)
|
194 |
run.click(send_it1, inputs=[prompt, noise_level], outputs=[output1])
|
|
|
12 |
text_gen=gr.Interface.load("spaces/phenomenon1981/MagicPrompt-Stable-Diffusion")
|
13 |
def get_prompts(prompt_text):
|
14 |
if prompt_text:
|
15 |
+
return text_gen(prompt_text + " photo, movie still")
|
16 |
else:
|
17 |
return text_gen("")
|
18 |
+
proc1=gr.Interface.load("Yntec/photoMovieX")
|
19 |
|
20 |
def restart_script_periodically():
|
21 |
while True:
|
|
|
54 |
noise_indices = random.sample(range(len(prompt)), num_noise_chars)
|
55 |
prompt_list = list(prompt)
|
56 |
noise_chars = list(string.ascii_letters + string.punctuation + ' ' + string.digits)
|
57 |
+
noise_chars.extend(['๐', 'beautiful', '๐', '๐ค', '๐', '๐ค', '๐ญ', '๐', 'pretty', '๐คฏ', '๐คซ', '๐ฅด', 'sitting', '๐คฉ', '๐ฅณ', '๐', '๐ฉ', '๐คช', '๐', 'retro', '๐', '๐น', 'masterpiece', '๐ค', '๐ฝ', 'high quality', '๐', '๐
', '๐', '๐', '๐', '๐', '๐', '๐', '๐ฎ', 'โค๏ธ', '๐', '๐', '๐', '๐', '๐ถ', '๐ฑ', 'visible', '๐น', '๐ฆ', '๐ป', '๐จ', '๐ฏ', '๐ฆ', '๐', '๐ฅ', '๐ง๏ธ', '๐', '๐', '๐ฅ', '๐ด', '๐', '๐บ', '๐ป', '๐ธ', '๐จ', '๐
', '๐', 'โ๏ธ', 'โ๏ธ', 'โ๏ธ', 'โ๏ธ', '๐ค๏ธ', 'โ
๏ธ', '๐ฅ๏ธ', '๐ฆ๏ธ', '๐ง๏ธ', '๐ฉ๏ธ', '๐จ๏ธ', '๐ซ๏ธ', 'โ๏ธ', '๐ฌ๏ธ', '๐จ', '๐ช๏ธ', 'cute', 'kawaii', 'little', 'photo', 'movie', 'still'])
|
58 |
for index in noise_indices:
|
59 |
prompt_list[index] = random.choice(noise_chars)
|
60 |
return "".join(prompt_list)
|
|
|
131 |
}
|
132 |
</style>
|
133 |
<body>
|
134 |
+
<div class="center"><h1>PhotoMovieX</h1>
|
135 |
</div>
|
136 |
</body>
|
137 |
</div>
|
138 |
<p style="margin-bottom: 10px; color: #ffffff;">
|
139 |
+
Celebrating 50000 downloads!
|
140 |
+
<a href="https://civitai.com/models/94687?modelVersionId=101000">Check MagicArt35's original model page here!</a>.
|
141 |
If you have an idea, put it on the first box to expand it, if you have a full prompt, you can leave the first box empty and just put it on the second one and click generate images!
|
142 |
Noise Level: Controls how much randomness is added to the input of the boxes after the first one before it is sent to the model, so you can get 6 unique 768x768 images. Higher noise level produces more diverse outputs, while lower noise level produces similar outputs,
|
143 |
<a href="https://twitter.com/DavidJohnstonxx/">original space created by Phenomenon1981</a>.
|
|
|
178 |
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! ๐คฃ)")
|
179 |
with gr.Row():
|
180 |
with gr.Row():
|
181 |
+
output1=gr.Image(label="PhotoMovieX",show_label=False,min_width=640)
|
182 |
+
output2=gr.Image(label="PhotoMovieX",show_label=False,min_width=640)
|
183 |
with gr.Row():
|
184 |
with gr.Row():
|
185 |
+
output3=gr.Image(label="PhotoMovieX",show_label=False,min_width=640)
|
186 |
+
output4=gr.Image(label="PhotoMovieX",show_label=False,min_width=640)
|
187 |
with gr.Row():
|
188 |
with gr.Row():
|
189 |
+
output5=gr.Image(label="PhotoMovieX",show_label=False,min_width=640)
|
190 |
+
outputX=gr.Image(label="PhotoMovieX",show_label=False,min_width=640)
|
191 |
#with gr.Row():
|
192 |
#with gr.Row():
|
193 |
+
#output0=gr.Image(label="PhotoMovieX",show_label=False,min_width=640)
|
194 |
|
195 |
see_prompts.click(get_prompts, inputs=[input_text], outputs=[prompt], queue=False)
|
196 |
run.click(send_it1, inputs=[prompt, noise_level], outputs=[output1])
|