Yntec commited on
Commit
c93b970
โ€ข
1 Parent(s): 5c847b9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -11
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 + " Dream")
16
  else:
17
  return text_gen("")
18
- proc1=gr.Interface.load("models/Yntec/DreamAnything")
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>DreamAnything</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="DreamAnything",show_label=False,min_width=640)
180
- output2=gr.Image(label="DreamAnything",show_label=False,min_width=640)
181
  with gr.Row():
182
  with gr.Row():
183
- output3=gr.Image(label="DreamAnything",show_label=False,min_width=640)
184
- output4=gr.Image(label="DreamAnything",show_label=False,min_width=640)
185
  with gr.Row():
186
  with gr.Row():
187
- output5=gr.Image(label="DreamAnything",show_label=False,min_width=640)
188
- outputX=gr.Image(label="DreamAnything",show_label=False,min_width=640)
189
  #with gr.Row():
190
  #with gr.Row():
191
- #output0=gr.Image(label="DreamAnything",show_label=False,min_width=640)
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])