prithivMLmods commited on
Commit
508feab
·
verified ·
1 Parent(s): c3d4dea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +68 -3
app.py CHANGED
@@ -1,4 +1,10 @@
1
  #!/usr/bin/env python
 
 
 
 
 
 
2
  import os
3
  import random
4
  import uuid
@@ -23,8 +29,9 @@ DESCRIPTIONXX = """
23
  """
24
 
25
  examples = [
26
- "Illustration of A starry night camp in the mountains, 4k, cinematic --ar 85:128 --v 6.0 --style raw",
27
- "A delicious ceviche cheesecake slice, 4k, octane render, ray tracing, Ultra-High-Definition"
 
28
  ]
29
 
30
  MODEL_OPTIONS = {
@@ -158,6 +165,36 @@ def generate(
158
  image_paths = [save_image(img) for img in images]
159
  return image_paths, seed
160
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
161
  with gr.Blocks(css=css, theme="bethecloud/storj_theme") as demo:
162
  gr.Markdown(DESCRIPTIONXX)
163
  with gr.Row():
@@ -281,5 +318,33 @@ with gr.Blocks(css=css, theme="bethecloud/storj_theme") as demo:
281
  outputs=[result, seed],
282
  )
283
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
284
  if __name__ == "__main__":
285
- demo.queue(max_size=50).launch(show_api=False)
 
1
  #!/usr/bin/env python
2
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
3
+ # of this software and associated documentation files (the "Software"), to deal
4
+ # in the Software without restriction, including without limitation the rights
5
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6
+ # copies of the Software, and to permit persons to whom the Software is
7
+
8
  import os
9
  import random
10
  import uuid
 
29
  """
30
 
31
  examples = [
32
+ "A studio portrait of a brunette model wearing a overall in front of a natural background --v 6.0 --style raw",
33
+ "Hamburger in the style of dark beige and brown, uhd image, youthful protagonists, nonrepresentational ",
34
+ "Chocolate cline wedding cake with candles by stacy simon for stocksy united, in the style of canon af35m, smokey background, stock photo, 1970–present, dark gold --ar 33:50 --v 5 --iw 2.0 --no watermark"
35
  ]
36
 
37
  MODEL_OPTIONS = {
 
165
  image_paths = [save_image(img) for img in images]
166
  return image_paths, seed
167
 
168
+ #def load_predefined_images():
169
+ # predefined_images = [
170
+ # "assets/1.png",
171
+ # "assets/2.png",
172
+ # "assets/3.png",
173
+ # "assets/4.png",
174
+ # "assets/5.png",
175
+ # "assets/6.png",
176
+ # "assets/7.png",
177
+ #"assets/8.png",
178
+ #"assets/9.png",
179
+ #]
180
+ #return predefined_images
181
+
182
+
183
+ # def load_predefined_images():
184
+ # predefined_images = [
185
+ # "assets2/11.png",
186
+ # "assets2/22.png",
187
+ # "assets2/33.png",
188
+ # "assets2/44.png",
189
+ # "assets2/55.png",
190
+ # "assets2/66.png",
191
+ # "assets2/77.png",
192
+ # "assets2/88.png",
193
+ # "assets2/99.png",
194
+ # ]
195
+ # return predefined_image
196
+
197
+
198
  with gr.Blocks(css=css, theme="bethecloud/storj_theme") as demo:
199
  gr.Markdown(DESCRIPTIONXX)
200
  with gr.Row():
 
318
  outputs=[result, seed],
319
  )
320
 
321
+ #gr.Markdown("### REALVISXL V5.0")
322
+ #predefined_gallery = gr.Gallery(label="REALVISXL V5.0", columns=3, show_label=False, value=load_predefined_images1())
323
+
324
+ #gr.Markdown("### LIGHTNING V5.0")
325
+ #predefined_gallery = gr.Gallery(label="LIGHTNING V5.0", columns=3, show_label=False, value=load_predefined_images())
326
+
327
+ gr.Markdown(
328
+ """
329
+ <div style="text-align: justify;">
330
+ ⚡Models used in the playground <a href="https://huggingface.co/SG161222/RealVisXL_V5.0">[REALVISXL V5.0]</a>, <a href="https://huggingface.co/SG161222/RealVisXL_V5.0_Lightning">[REALVISXL V5.0 LIGHTNING]</a> for image generation. Stable Diffusion XL piped (SDXL) model HF. This is the demo space for generating images using the Stable Diffusion XL models, with multiple different variants available.
331
+ </div>
332
+ """)
333
+
334
+ gr.Markdown(
335
+ """
336
+ <div style="text-align: justify;">
337
+ ⚡This is the demo space for generating images using Stable Diffusion XL with quality styles, different models, and types. Try the sample prompts to generate higher quality images. Try the sample prompts for generating higher quality images.
338
+ <a href='https://huggingface.co/spaces/prithivMLmods/Top-Prompt-Collection' target='_blank'>Try prompts</a>.
339
+ </div>
340
+ """)
341
+
342
+ gr.Markdown(
343
+ """
344
+ <div style="text-align: justify;">
345
+ ⚠️ Users are accountable for the content they generate and are responsible for ensuring it meets appropriate ethical standards.
346
+ </div>
347
+ """)
348
+
349
  if __name__ == "__main__":
350
+ demo.queue(max_size=50).launch(show_api=False)