taesiri commited on
Commit
6716c60
1 Parent(s): 89cc161
Files changed (1) hide show
  1. app.py +13 -0
app.py CHANGED
@@ -79,6 +79,19 @@ for root, dirs, files in os.walk("./dogs"):
79
  NUMBER_OF_IMAGES = 30
80
  intro_screen = Image.open("./images/intro.jpg")
81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  meta_top1 = json.load(open("./dogs/top1/metadata.json"))
83
  meta_topK = json.load(open("./dogs/topK/metadata.json"))
84
 
 
79
  NUMBER_OF_IMAGES = 30
80
  intro_screen = Image.open("./images/intro.jpg")
81
 
82
+ # chec kif the metadata is present
83
+ if not os.path.exists("./dogs/top1/metadata.json"):
84
+ print("metadata.json is not present")
85
+ # show the content of dogs and top1
86
+ print("Contents of the dogs folder:")
87
+ for root, dirs, files in os.walk("./dogs"):
88
+ level = root.replace("./dogs", "").count(os.sep)
89
+ indent = " " * 4 * (level)
90
+ print(f"{indent}{os.path.basename(root)}/")
91
+ subindent = " " * 4 * (level + 1)
92
+ for f in files:
93
+ print(f"{subindent}{f}")
94
+
95
  meta_top1 = json.load(open("./dogs/top1/metadata.json"))
96
  meta_topK = json.load(open("./dogs/topK/metadata.json"))
97