inspiration perfected
This commit is contained in:
parent
40ddb6df61
commit
d93ea5cdeb
1 changed files with 5 additions and 2 deletions
|
@ -73,8 +73,11 @@ def get_inspiration_images(source, types, keyword):
|
||||||
image_list = []
|
image_list = []
|
||||||
for a in names:
|
for a in names:
|
||||||
image_path = os.path.join(opts.inspiration_dir, a)
|
image_path = os.path.join(opts.inspiration_dir, a)
|
||||||
images = os.listdir(image_path)
|
images = os.listdir(image_path)
|
||||||
image_list.append((os.path.join(image_path, random.choice(images)), a))
|
if len(images) > 0:
|
||||||
|
image_list.append((os.path.join(image_path, random.choice(images)), a))
|
||||||
|
else:
|
||||||
|
print(image_path)
|
||||||
return image_list, names
|
return image_list, names
|
||||||
|
|
||||||
def select_click(index, name_list):
|
def select_click(index, name_list):
|
||||||
|
|
Loading…
Reference in a new issue