|
|
#!/usr/bin/env bash |
|
|
set -e |
|
|
|
|
|
|
|
|
if [ -z "$HF_TOKEN" ]; then |
|
|
echo "โ ๏ธ ู
ุชุบูุฑ HF_TOKEN ุบูุฑ ู
ุนุฑู. ูุฏ ูุชุณุจุจ ูุฐุง ูู ูุดู ุชุญู
ูู ุงููู
ูุฐุฌ." |
|
|
fi |
|
|
|
|
|
|
|
|
mkdir -p models |
|
|
|
|
|
|
|
|
python - <<PY |
|
|
from huggingface_hub import hf_hub_download |
|
|
import os |
|
|
repo_id = "TheBloke/Mistral-7B-Instruct-v0.1-GGUF" |
|
|
filename = "mistral-7b-instruct-v0.1.Q4_K_M.gguf" |
|
|
local_dir = "models" |
|
|
if not os.path.exists(os.path.join(local_dir, filename)): |
|
|
hf_hub_download( |
|
|
repo_id=repo_id, |
|
|
filename=filename, |
|
|
local_dir=local_dir, |
|
|
local_dir_use_symlinks=False, |
|
|
force_download=False, |
|
|
token=os.environ.get("HF_TOKEN") |
|
|
) |
|
|
print("โ
ุชู
ุชุญู
ูู Mistral .gguf") |
|
|
else: |
|
|
print("โ
ุงูู
ูู ู
ูุฌูุฏ ู
ุณุจููุง") |
|
|
PY |
|
|
|