Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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()
|