Spaces:
Runtime error
Runtime error
Upload download_data.py with huggingface_hub
Browse files- download_data.py +3 -1
download_data.py
CHANGED
|
@@ -1,6 +1,8 @@
|
|
| 1 |
from huggingface_hub import hf_hub_download
|
| 2 |
import os
|
|
|
|
|
|
|
| 3 |
os.makedirs("data", exist_ok=True)
|
| 4 |
for f in ["papers.db", "faiss_index.bin"]:
|
| 5 |
-
hf_hub_download(repo_id=
|
| 6 |
print("Data ready!")
|
|
|
|
| 1 |
from huggingface_hub import hf_hub_download
|
| 2 |
import os
|
| 3 |
+
|
| 4 |
+
REPO_ID = os.getenv("HF_REPO_ID", "vengen9840/paperlens-data")
|
| 5 |
os.makedirs("data", exist_ok=True)
|
| 6 |
for f in ["papers.db", "faiss_index.bin"]:
|
| 7 |
+
hf_hub_download(repo_id=REPO_ID, filename=f, repo_type="dataset", local_dir="data")
|
| 8 |
print("Data ready!")
|