Update setup.sh
Browse files
setup.sh
CHANGED
|
@@ -6,11 +6,11 @@ if [ -z "$HF_TOKEN" ]; then
|
|
| 6 |
echo "โ ๏ธ ู
ุชุบูุฑ HF_TOKEN ุบูุฑ ู
ุนุฑู. ูุฏ ูุชุณุจุจ ูุฐุง ูู ูุดู ุชุญู
ูู ุงููู
ูุฐุฌ."
|
| 7 |
fi
|
| 8 |
|
| 9 |
-
# ุฅูุดุงุก
|
| 10 |
-
mkdir -p models
|
| 11 |
-
chown -R appuser:appuser models
|
| 12 |
|
| 13 |
-
# ุชุญู
ูู ู
ูู .gguf ุฅุฐุง ูู
ููู ู
ูุฌูุฏูุง ู
ุณุจููุง
|
| 14 |
python - <<PY
|
| 15 |
from huggingface_hub import hf_hub_download
|
| 16 |
import os
|
|
@@ -28,5 +28,24 @@ if not os.path.exists(os.path.join(local_dir, filename)):
|
|
| 28 |
)
|
| 29 |
print("โ
ุชู
ุชุญู
ูู Mistral .gguf")
|
| 30 |
else:
|
| 31 |
-
print("โ
|
| 32 |
PY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
echo "โ ๏ธ ู
ุชุบูุฑ HF_TOKEN ุบูุฑ ู
ุนุฑู. ูุฏ ูุชุณุจุจ ูุฐุง ูู ูุดู ุชุญู
ูู ุงููู
ูุฐุฌ."
|
| 7 |
fi
|
| 8 |
|
| 9 |
+
# ุฅูุดุงุก ู
ุฌูุฏุงุช ูุชุฎุฒูู ุงููู
ุงุฐุฌ ูุงูู cache
|
| 10 |
+
mkdir -p models /app/.cache/huggingface
|
| 11 |
+
chown -R appuser:appuser models /app/.cache/huggingface
|
| 12 |
|
| 13 |
+
# ุชุญู
ูู ู
ูู Mistral .gguf ุฅุฐุง ูู
ููู ู
ูุฌูุฏูุง ู
ุณุจููุง
|
| 14 |
python - <<PY
|
| 15 |
from huggingface_hub import hf_hub_download
|
| 16 |
import os
|
|
|
|
| 28 |
)
|
| 29 |
print("โ
ุชู
ุชุญู
ูู Mistral .gguf")
|
| 30 |
else:
|
| 31 |
+
print("โ
ู
ูู Mistral .gguf ู
ูุฌูุฏ ู
ุณุจููุง")
|
| 32 |
PY
|
| 33 |
+
|
| 34 |
+
# ุชุญู
ูู ูู
ูุฐุฌ MGZON-FLAN-T5 ุฅุฐุง ูู
ููู ู
ูุฌูุฏูุง ู
ุณุจููุง
|
| 35 |
+
python - <<PY
|
| 36 |
+
from huggingface_hub import snapshot_download
|
| 37 |
+
import os
|
| 38 |
+
repo_id = "MGZON/mgzon-flan-t5-base"
|
| 39 |
+
local_dir = "/app/.cache/huggingface/hub/models--MGZON--mgzon-flan-t5-base/snapshots"
|
| 40 |
+
if not os.path.exists(local_dir):
|
| 41 |
+
snapshot_download(
|
| 42 |
+
repo_id=repo_id,
|
| 43 |
+
local_dir=local_dir,
|
| 44 |
+
local_dir_use_symlinks=False,
|
| 45 |
+
force_download=False,
|
| 46 |
+
token=os.environ.get("HF_TOKEN")
|
| 47 |
+
)
|
| 48 |
+
print("โ
ุชู
ุชุญู
ูู MGZON-FLAN-T5")
|
| 49 |
+
else:
|
| 50 |
+
print("โ
ู
ููุงุช MGZON-FLAN-T5 ู
ูุฌูุฏุฉ ู
ุณุจููุง")
|
| 51 |
+
PY
|