Spaces:
Sleeping
Sleeping
Delete download_models.py
#2
by
jpmendes
- opened
- download_models.py +0 -29
download_models.py
DELETED
|
@@ -1,29 +0,0 @@
|
|
| 1 |
-
from huggingface_hub import hf_hub_download
|
| 2 |
-
from pathlib import Path
|
| 3 |
-
import os
|
| 4 |
-
|
| 5 |
-
# Pasta dos modelos
|
| 6 |
-
MODEL_DIR = Path("./models")
|
| 7 |
-
MODEL_DIR.mkdir(exist_ok=True)
|
| 8 |
-
|
| 9 |
-
# Modelos e arquivos
|
| 10 |
-
MODELS = {
|
| 11 |
-
"Q3_K_XL": "Llama-3.2-1B-Instruct-Q3_K_XL.gguf",
|
| 12 |
-
"Q4_K_M": "Llama-3.2-1B-Instruct-Q4_K_M.gguf",
|
| 13 |
-
}
|
| 14 |
-
|
| 15 |
-
REPO_ID = "bartowski/Llama-3.2-1B-Instruct-GGUF"
|
| 16 |
-
|
| 17 |
-
for key, file_name in MODELS.items():
|
| 18 |
-
file_path = MODEL_DIR / file_name
|
| 19 |
-
if not file_path.exists():
|
| 20 |
-
print(f"Baixando {file_name}...")
|
| 21 |
-
hf_hub_download(
|
| 22 |
-
repo_id=REPO_ID,
|
| 23 |
-
filename=file_name,
|
| 24 |
-
local_dir=MODEL_DIR,
|
| 25 |
-
force_filename=file_name
|
| 26 |
-
)
|
| 27 |
-
print(f"{file_name} salvo em {file_path}")
|
| 28 |
-
else:
|
| 29 |
-
print(f"{file_name} já existe, pulando download")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|