prithivMLmods commited on
Commit
ae24136
1 Parent(s): 6db153c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -1
app.py CHANGED
@@ -331,6 +331,22 @@ def generate(
331
  save_image(grid_img, unique_name)
332
  return [unique_name], seed
333
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
334
  examples = [
335
 
336
  "Portrait of a beautiful woman in a hat, summer outfit, with freckles on her face, in a close up shot, with sunlight, outdoors, in soft light, with a beach background, looking at the camera, with high resolution photography, in the style of Hasselblad X2D50c --ar 85:128 --v 6.0 --style raw",
@@ -504,9 +520,13 @@ with gr.Blocks(css=css, theme="bethecloud/storj_theme") as demo:
504
  api_name="run",
505
  )
506
 
 
 
 
 
 
507
  #gr.Markdown("⚠️ responsible for ensuring it meets appropriate ethical standards")
508
  gr.Markdown(DESCRIPTIONy)
509
- # Adding a note about user responsibility
510
  gr.Markdown("**Note:**")
511
  gr.Markdown("⚠️ users are accountable for the content they generate and are responsible for ensuring it meets appropriate ethical standards.")
512
 
 
331
  save_image(grid_img, unique_name)
332
  return [unique_name], seed
333
 
334
+
335
+ def load_predefined_images():
336
+ predefined_images = [
337
+ "assets/1.png",
338
+ "assets/2.png",
339
+ "assets/3.png",
340
+ "assets/4.png",
341
+ "assets/5.png",
342
+ "assets/6.png",
343
+ "assets/7.png",
344
+ "assets/8.png",
345
+ "assets/9.png",
346
+ ]
347
+ return predefined_images
348
+
349
+
350
  examples = [
351
 
352
  "Portrait of a beautiful woman in a hat, summer outfit, with freckles on her face, in a close up shot, with sunlight, outdoors, in soft light, with a beach background, looking at the camera, with high resolution photography, in the style of Hasselblad X2D50c --ar 85:128 --v 6.0 --style raw",
 
520
  api_name="run",
521
  )
522
 
523
+
524
+ # Adding a predefined gallery section
525
+ gr.Markdown("### Generated Wallpapers")
526
+ predefined_gallery = gr.Gallery(label="Generated Images", columns=3, show_label=False, value=load_predefined_images())
527
+
528
  #gr.Markdown("⚠️ responsible for ensuring it meets appropriate ethical standards")
529
  gr.Markdown(DESCRIPTIONy)
 
530
  gr.Markdown("**Note:**")
531
  gr.Markdown("⚠️ users are accountable for the content they generate and are responsible for ensuring it meets appropriate ethical standards.")
532