MGZON commited on
Commit
2f80b15
ยท
verified ยท
1 Parent(s): da159d9

Update setup.sh

Browse files
Files changed (1) hide show
  1. setup.sh +24 -5
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