taesiri commited on
Commit
ad75351
1 Parent(s): 2028cdf
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -46,13 +46,11 @@ zip_file_path = hf_hub_download(
46
 
47
  print(f"zip_file_path: {zip_file_path}")
48
 
49
- # Check if the file exists and print the file size
50
  if os.path.exists(zip_file_path):
51
  print(f"File size: {os.path.getsize(zip_file_path)} bytes")
52
  else:
53
  print("File does not exist.")
54
 
55
- # Attempt to extract the zip file
56
  try:
57
  with zipfile.ZipFile(zip_file_path, "r") as zip_ref:
58
  zip_ref.extractall("./")
@@ -60,7 +58,16 @@ try:
60
  except Exception as e:
61
  print(f"Failed to extract the zip file: {e}")
62
 
 
 
 
 
 
 
 
 
63
 
 
64
 
65
  NUMBER_OF_IMAGES = 30
66
  intro_screen = Image.open("./images/intro.jpg")
 
46
 
47
  print(f"zip_file_path: {zip_file_path}")
48
 
 
49
  if os.path.exists(zip_file_path):
50
  print(f"File size: {os.path.getsize(zip_file_path)} bytes")
51
  else:
52
  print("File does not exist.")
53
 
 
54
  try:
55
  with zipfile.ZipFile(zip_file_path, "r") as zip_ref:
56
  zip_ref.extractall("./")
 
58
  except Exception as e:
59
  print(f"Failed to extract the zip file: {e}")
60
 
61
+ import os
62
+
63
+ # After the extraction line
64
+ print("Directory contents:", os.listdir("./dogs/topK/"))
65
+
66
+ with zipfile.ZipFile(zip_file_path, "r") as zip_ref:
67
+ print("Zip contents:", zip_ref.namelist())
68
+ zip_ref.extractall("./")
69
 
70
+
71
 
72
  NUMBER_OF_IMAGES = 30
73
  intro_screen = Image.open("./images/intro.jpg")