mlbench123 commited on
Commit
9ba35be
·
verified ·
1 Parent(s): 4580638

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -435,7 +435,8 @@ def create_demo():
435
  basic_stitcher.config['ransac_threshold'] = ransac_thresh
436
 
437
  # Load images
438
- images = [Image.open(f.name) for f in files]
 
439
 
440
  # Process
441
  return basic_stitcher.stitch_images(images)
@@ -450,7 +451,7 @@ def create_demo():
450
  tmpdir_path = Path(tmpdir)
451
 
452
  # Extract ZIP
453
- with zipfile.ZipFile(zip_file.name, 'r') as zip_ref:
454
  zip_ref.extractall(tmpdir_path)
455
 
456
  # Find images and metadata
 
435
  basic_stitcher.config['ransac_threshold'] = ransac_thresh
436
 
437
  # Load images
438
+ images = [Image.open(f) for f in files]
439
+
440
 
441
  # Process
442
  return basic_stitcher.stitch_images(images)
 
451
  tmpdir_path = Path(tmpdir)
452
 
453
  # Extract ZIP
454
+ with zipfile.ZipFile(zip_file, 'r') as zip_ref:
455
  zip_ref.extractall(tmpdir_path)
456
 
457
  # Find images and metadata