awacke1 commited on
Commit
a29343d
Β·
1 Parent(s): 41dee5c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -13,10 +13,14 @@ Article = Article + " Originals go here: https://github.com/AaronCWacker/Yggdras
13
 
14
  def fake_gan():
15
  base_dir = os.getcwd() # Get the current base directory
16
- png_files = [file for file in os.listdir(base_dir) if file.endswith(".png")] # List all files ending with ".png"
 
 
17
 
 
 
 
18
  images = [(random.choice(png_files), os.path.splitext(file)[0]) for file in png_files]
19
-
20
  return images
21
 
22
  def fake_gan_old2():
 
13
 
14
  def fake_gan():
15
  base_dir = os.getcwd() # Get the current base directory
16
+ jpg_files = [file for file in os.listdir(base_dir) if file.lower().endswith((".jpg", ".jpeg"))] # List all files ending with ".jpg" or ".jpeg"
17
+ images = [(random.choice(jpg_files), os.path.splitext(file)[0]) for file in jpg_files]
18
+ return images
19
 
20
+ def fake_gan_old3():
21
+ base_dir = os.getcwd() # Get the current base directory
22
+ png_files = [file for file in os.listdir(base_dir) if file.endswith(".jpg")] # List all files ending with ".png"
23
  images = [(random.choice(png_files), os.path.splitext(file)[0]) for file in png_files]
 
24
  return images
25
 
26
  def fake_gan_old2():