ginipick commited on
Commit
5746bdb
1 Parent(s): 765f3a8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py CHANGED
@@ -187,5 +187,14 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css) as demo:
187
  outputs=gallery
188
  )
189
 
 
 
 
 
 
 
 
 
190
  if __name__ == "__main__":
 
191
  demo.launch()
 
187
  outputs=gallery
188
  )
189
 
190
+ def check_gallery_status():
191
+ print(f"Gallery directory exists: {os.path.exists(GALLERY_DIR)}")
192
+ print(f"Gallery JSON exists: {os.path.exists(GALLERY_JSON)}")
193
+ if os.path.exists(GALLERY_JSON):
194
+ with open(GALLERY_JSON, "r") as f:
195
+ gallery = json.load(f)
196
+ print(f"Number of items in gallery: {len(gallery)}")
197
+
198
  if __name__ == "__main__":
199
+ check_gallery_status()
200
  demo.launch()