rahulmishra commited on
Commit
f17d6cd
·
1 Parent(s): d23dcb7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -40,9 +40,10 @@ def view_random_image(target_dir, target_class):
40
  target_folder = target_dir+target_class
41
 
42
  # Get a random image path
43
- random_image = random.choices(os.listdir(target_folder), k=1)
44
 
45
 
 
46
  # Read in the image and plot it using matplotlib
47
  img = mpimg.imread(target_folder + "/" + random_image[0])
48
  plt.imshow(img)
 
40
  target_folder = target_dir+target_class
41
 
42
  # Get a random image path
43
+ random_image = random.sample(os.listdir(target_folder), 1)
44
 
45
 
46
+
47
  # Read in the image and plot it using matplotlib
48
  img = mpimg.imread(target_folder + "/" + random_image[0])
49
  plt.imshow(img)