Spaces:
Build error
Build error
Commit
·
3f0fe86
1
Parent(s):
6a6972e
fix app.py
Browse files
app.py
CHANGED
|
@@ -19,14 +19,14 @@ CACHE_DIR = os.getenv("CACHE_DIR")
|
|
| 19 |
if not os.path.exists(CACHE_DIR):
|
| 20 |
os.makedirs(CACHE_DIR)
|
| 21 |
|
|
|
|
|
|
|
| 22 |
if not os.path.exists(INDEX_FILE):
|
| 23 |
raise FileNotFoundError(f"{INDEX_FILE} not found. Please make sure the file exists.")
|
| 24 |
|
| 25 |
with open(INDEX_FILE, 'r') as f:
|
| 26 |
file_structure = json.load(f)
|
| 27 |
|
| 28 |
-
indexer()
|
| 29 |
-
|
| 30 |
def prefetch_metadata():
|
| 31 |
for item in file_structure:
|
| 32 |
if 'contents' in item:
|
|
|
|
| 19 |
if not os.path.exists(CACHE_DIR):
|
| 20 |
os.makedirs(CACHE_DIR)
|
| 21 |
|
| 22 |
+
indexer()
|
| 23 |
+
|
| 24 |
if not os.path.exists(INDEX_FILE):
|
| 25 |
raise FileNotFoundError(f"{INDEX_FILE} not found. Please make sure the file exists.")
|
| 26 |
|
| 27 |
with open(INDEX_FILE, 'r') as f:
|
| 28 |
file_structure = json.load(f)
|
| 29 |
|
|
|
|
|
|
|
| 30 |
def prefetch_metadata():
|
| 31 |
for item in file_structure:
|
| 32 |
if 'contents' in item:
|