Spaces:
Runtime error
Runtime error
Update tools.py
Browse files
tools.py
CHANGED
|
@@ -79,10 +79,11 @@ class SearchArgs(BaseModel):
|
|
| 79 |
|
| 80 |
|
| 81 |
index_path = INDEX_PATH
|
|
|
|
| 82 |
if not os.path.exists(index_path):
|
| 83 |
try:
|
| 84 |
zip_path = "index.zip"
|
| 85 |
-
url = f"https://drive.google.com/uc?id={
|
| 86 |
gdown.download(url, zip_path, quiet=False)
|
| 87 |
with zipfile.ZipFile(zip_path, 'r') as zip_ref:
|
| 88 |
zip_ref.extractall(".")
|
|
|
|
| 79 |
|
| 80 |
|
| 81 |
index_path = INDEX_PATH
|
| 82 |
+
gdrive_index_id = os.getenv("GDRIVE_INDEX_ID", "1lpbBCPimwcNfC0VZOlQueA4SHNGIp5_t")
|
| 83 |
if not os.path.exists(index_path):
|
| 84 |
try:
|
| 85 |
zip_path = "index.zip"
|
| 86 |
+
url = f"https://drive.google.com/uc?id={gdrive_index_id}"
|
| 87 |
gdown.download(url, zip_path, quiet=False)
|
| 88 |
with zipfile.ZipFile(zip_path, 'r') as zip_ref:
|
| 89 |
zip_ref.extractall(".")
|