Spaces:
Runtime error
Runtime error
Commit
·
d23dcb7
1
Parent(s):
137bdf0
Update app.py
Browse files
app.py
CHANGED
@@ -40,7 +40,7 @@ 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), 1)
|
44 |
|
45 |
|
46 |
# Read in the image and plot it using matplotlib
|
|
|
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
|