stzhao commited on
Commit
043141a
·
verified ·
1 Parent(s): c24b5ac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -98,10 +98,12 @@ def copy_font_style(original_run, new_run):
98
 
99
  def process_pptx(pptx_file):
100
  images_dir_path = "images"
101
- output_dir = 'rendered_png' # Directory to save the rendered images
102
  if not os.path.exists(images_dir_path):
103
  os.makedirs(images_dir_path)
104
- json_output, image_paths = transfer_to_structure(pptx_file.name, images_dir_path)
 
 
105
 
106
  images, slide_dimensions = pptx_to_images(pptx_file)
107
  rendered_image_path = render_images_with_skia(images, slide_dimensions, output_dir)
 
98
 
99
  def process_pptx(pptx_file):
100
  images_dir_path = "images"
101
+ output_dir = "rendered_png" # Directory to save the rendered images
102
  if not os.path.exists(images_dir_path):
103
  os.makedirs(images_dir_path)
104
+ if not os.path.exists(output_dir):
105
+ os.makedirs(output_dir)
106
+ json_output, image_paths = transfer_to_structure(pptx_file, images_dir_path)
107
 
108
  images, slide_dimensions = pptx_to_images(pptx_file)
109
  rendered_image_path = render_images_with_skia(images, slide_dimensions, output_dir)