Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -654,19 +654,7 @@ def load_image_checklist(file):
|
|
| 654 |
current_index = 0
|
| 655 |
image_names = []
|
| 656 |
|
| 657 |
-
def unzip_images(zip_file_path, extract_to):
|
| 658 |
-
with zipfile.ZipFile(zip_file_path, 'r') as zip_ref:
|
| 659 |
-
zip_ref.extractall(extract_to)
|
| 660 |
-
print("unzip successful")
|
| 661 |
-
|
| 662 |
-
|
| 663 |
def show_image(current_idx):
|
| 664 |
-
zip_file_path = './img_data.zip'
|
| 665 |
-
images_folder = './images'
|
| 666 |
-
if not os.path.exists(images_folder):
|
| 667 |
-
os.makedirs(images_folder)
|
| 668 |
-
unzip_images(zip_file_path, images_folder)
|
| 669 |
-
print(os.getcwd(images_folder))
|
| 670 |
image_name=image_names[current_idx]
|
| 671 |
image_path = f"./images/{image_name}.jpg"
|
| 672 |
if not os.path.exists(image_path):
|
|
|
|
| 654 |
current_index = 0
|
| 655 |
image_names = []
|
| 656 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 657 |
def show_image(current_idx):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 658 |
image_name=image_names[current_idx]
|
| 659 |
image_path = f"./images/{image_name}.jpg"
|
| 660 |
if not os.path.exists(image_path):
|