Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
|
|
|
| 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
|
| 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
|