Kvikontent commited on
Commit
0e5fcb5
·
1 Parent(s): 4c60fe5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -291,6 +291,14 @@ def generate_image(prompt):
291
  "https://img.freepik.com/premium-photo/coconut-palm-tree-beach-thailand-coconut-tree-with-blur-sky_34142-182.jpg?size=626&ext=jpg&ga=GA1.1.1708812069.1697374121&semt=ais",
292
  "https://img.freepik.com/free-photo/tropical-beach_74190-188.jpg?size=626&ext=jpg&ga=GA1.1.1708812069.1697374121&semt=ais"
293
  ]
 
 
 
 
 
 
 
 
294
 
295
 
296
  if "face" in prompt:
@@ -361,6 +369,8 @@ def generate_image(prompt):
361
  output_url = random.choice(tree)
362
  elif "palm" in prompt:
363
  output_url = random.choice(palmtree)
 
 
364
  else:
365
  return "No image generated."
366
  image = load_image(output_url)
 
291
  "https://img.freepik.com/premium-photo/coconut-palm-tree-beach-thailand-coconut-tree-with-blur-sky_34142-182.jpg?size=626&ext=jpg&ga=GA1.1.1708812069.1697374121&semt=ais",
292
  "https://img.freepik.com/free-photo/tropical-beach_74190-188.jpg?size=626&ext=jpg&ga=GA1.1.1708812069.1697374121&semt=ais"
293
  ]
294
+
295
+ book = [
296
+ "https://img.freepik.com/free-photo/front-view-woman-with-book-collage_23-2150149037.jpg?size=626&ext=jpg&ga=GA1.1.1708812069.1697374121&semt=sph",
297
+ "https://img.freepik.com/free-psd/magazine-mockup-with-leaves-golden-frame_53876-89586.jpg?size=626&ext=jpg&ga=GA1.1.1708812069.1697374121&semt=sph",
298
+ "https://img.freepik.com/free-photo/book-that-leaves-paper-hearts_1232-910.jpg?size=626&ext=jpg&ga=GA1.1.1708812069.1697374121&semt=sph",
299
+ "https://img.freepik.com/premium-photo/pile-documents-desk-office-stack-business-papersgenerative-ai_391052-15381.jpg?size=626&ext=jpg&ga=GA1.1.1708812069.1697374121&semt=sph",
300
+ "https://img.freepik.com/free-photo/old-books-arrangement-with-copy-space_23-2148898331.jpg?size=626&ext=jpg&ga=GA1.1.1708812069.1697374121&semt=sph"
301
+ ]
302
 
303
 
304
  if "face" in prompt:
 
369
  output_url = random.choice(tree)
370
  elif "palm" in prompt:
371
  output_url = random.choice(palmtree)
372
+ elif "book" in prompt:
373
+ output_url = random.choice(book)
374
  else:
375
  return "No image generated."
376
  image = load_image(output_url)