Spaces:
Sleeping
Sleeping
Commit
·
1513b55
1
Parent(s):
cfcc7c4
Remove functionality to download and copy db.sqlite3 from Hugging Face Hub in manage.py
Browse files
manage.py
CHANGED
|
@@ -2,23 +2,6 @@
|
|
| 2 |
"""Django's command-line utility for administrative tasks."""
|
| 3 |
import os
|
| 4 |
import sys
|
| 5 |
-
import shutil
|
| 6 |
-
|
| 7 |
-
from huggingface_hub import hf_hub_download
|
| 8 |
-
custom_cache_dir = os.path.expanduser("/app/.cache/huggingface")
|
| 9 |
-
|
| 10 |
-
file_path = hf_hub_download(
|
| 11 |
-
repo_id="SushantGautam/BridgeMentor",
|
| 12 |
-
filename="db.sqlite3",
|
| 13 |
-
repo_type="dataset",
|
| 14 |
-
cache_dir=custom_cache_dir
|
| 15 |
-
)
|
| 16 |
-
print(f"Downloaded to: {file_path}")
|
| 17 |
-
destination_path = os.path.join(os.getcwd(), "db.sqlite3")
|
| 18 |
-
shutil.copy(file_path, destination_path)
|
| 19 |
-
|
| 20 |
-
print(f"db.sqlite3 Copied to current directory: {destination_path}")
|
| 21 |
-
|
| 22 |
|
| 23 |
def main():
|
| 24 |
"""Run administrative tasks."""
|
|
|
|
| 2 |
"""Django's command-line utility for administrative tasks."""
|
| 3 |
import os
|
| 4 |
import sys
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
def main():
|
| 7 |
"""Run administrative tasks."""
|