| set -e | |
| # ุฅูุดุงุก ู ุฌูุฏุงุช ูุชุฎุฒูู ุงููู ุงุฐุฌ ูุงูู cache | |
| mkdir -p models /app/.cache/huggingface/hub | |
| chown -R appuser:appuser models /app/.cache/huggingface | |
| chmod -R 755 /app/.cache/huggingface | |
| # ุชุญู ูู ู ูู Mistral .gguf ุฅุฐุง ูู ููู ู ูุฌูุฏูุง ู ุณุจููุง | |
| 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.Q2_K.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 | |
| ) | |
| print("โ ุชู ุชุญู ูู Mistral .gguf") | |
| else: | |
| print("โ ู ูู Mistral .gguf ู ูุฌูุฏ ู ุณุจููุง") | |
| PY | |
| # ุชุญู ูู ูู ูุฐุฌ MGZON-FLAN-T5 ุฅุฐุง ูู ููู ู ูุฌูุฏูุง ู ุณุจููุง | |
| python - <<PY | |
| from huggingface_hub import snapshot_download | |
| import os | |
| repo_id = "MGZON/mgzon-flan-t5-base" | |
| local_dir = "/app/.cache/huggingface/hub/models--MGZON--mgzon-flan-t5-base/snapshots" | |
| if not os.path.exists(local_dir): | |
| snapshot_download( | |
| repo_id=repo_id, | |
| local_dir=local_dir, | |
| local_dir_use_symlinks=False, | |
| force_download=False | |
| ) | |
| print("โ ุชู ุชุญู ูู MGZON-FLAN-T5") | |
| else: | |
| print("โ ู ููุงุช MGZON-FLAN-T5 ู ูุฌูุฏุฉ ู ุณุจููุง") | |
| PY |