Prudvireddy commited on
Commit
d4d52a2
·
verified ·
1 Parent(s): 033e746

Update tools.py

Browse files
Files changed (1) hide show
  1. tools.py +2 -0
tools.py CHANGED
@@ -372,6 +372,7 @@ def image_generator(script):
372
  Args:
373
  script: a complete script containing narrations and image descriptions"""
374
  images_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), './outputs/images')
 
375
  # if num==1:
376
  for filename in os.listdir(images_dir):
377
  file_path = os.path.join(images_dir, filename)
@@ -410,6 +411,7 @@ def speech_generator(script):
410
  Args:
411
  script: a complete script containing narrations and image descriptions"""
412
  speech_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), './outputs/speeches')
 
413
 
414
  # if num==1:
415
  for filename in os.listdir(speech_dir):
 
372
  Args:
373
  script: a complete script containing narrations and image descriptions"""
374
  images_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), './outputs/images')
375
+ os.makedirs(images_dir, exist_ok=True)
376
  # if num==1:
377
  for filename in os.listdir(images_dir):
378
  file_path = os.path.join(images_dir, filename)
 
411
  Args:
412
  script: a complete script containing narrations and image descriptions"""
413
  speech_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), './outputs/speeches')
414
+ os.makedirs(speech_dir, exist_ok=True)
415
 
416
  # if num==1:
417
  for filename in os.listdir(speech_dir):