isam0 commited on
Commit
7bb7756
·
verified ·
1 Parent(s): 78c0ed2

Update entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +11 -11
entrypoint.sh CHANGED
@@ -5,40 +5,40 @@ MODEL_PATH="/app/models/nur.gguf"
5
 
6
  # Check if model exists
7
  if [ -f "$MODEL_PATH" ]; then
8
- echo "✅ Nur Brain (Qwen3) is already in storage."
9
  else
10
- echo "⏳ Brain missing. Downloading Qwen3-1.7B-Instruct..."
11
 
12
  mkdir -p /app/models
13
 
14
- # ⬇️ UPDATED DOWNLOAD SECTION ⬇️
15
  python3 -c "
16
  from huggingface_hub import hf_hub_download
17
  import os
18
  try:
19
- # Official Qwen3 GGUF repo
20
  path = hf_hub_download(
21
- repo_id='Qwen/Qwen3-1.7B-GGUF',
22
- filename='qwen3-1_7b-q4_k_m.gguf',
23
  local_dir='/app/models',
24
  local_dir_use_symlinks=False
25
  )
26
- # Rename it to your custom filename
27
  os.rename(path, '/app/models/nur.gguf')
28
- print('✅ Qwen3 Download complete!')
29
  except Exception as e:
30
  print(f'❌ Download failed: {e}')
31
  exit(1)
32
  "
33
  fi
34
 
35
- # Double check if the file is there now
36
  if [ ! -f "$MODEL_PATH" ]; then
37
- echo "❌ CRITICAL: Qwen3 model file still missing."
38
  exit 1
39
  fi
40
 
41
- echo "🚀 Starting Isam's Nur Brain (Qwen3) on Port 7860..."
42
 
43
  # Start the API
44
  exec uvicorn app.main:app --host 0.0.0.0 --port 7860
 
5
 
6
  # Check if model exists
7
  if [ -f "$MODEL_PATH" ]; then
8
+ echo "✅ Nur Brain is already in storage."
9
  else
10
+ echo "⏳ Brain missing. Downloading Qwen2.5-1.5B-Instruct..."
11
 
12
  mkdir -p /app/models
13
 
14
+ # ⬇️ VERIFIED DOWNLOAD SECTION ⬇️
15
  python3 -c "
16
  from huggingface_hub import hf_hub_download
17
  import os
18
  try:
19
+ # This is the official and stable repository for Qwen2.5 GGUF
20
  path = hf_hub_download(
21
+ repo_id='Qwen/Qwen2.5-1.5B-Instruct-GGUF',
22
+ filename='qwen2.5-1.5b-instruct-q4_k_m.gguf',
23
  local_dir='/app/models',
24
  local_dir_use_symlinks=False
25
  )
26
+ # Rename to your custom filename
27
  os.rename(path, '/app/models/nur.gguf')
28
+ print('✅ Qwen Download complete!')
29
  except Exception as e:
30
  print(f'❌ Download failed: {e}')
31
  exit(1)
32
  "
33
  fi
34
 
35
+ # Double check
36
  if [ ! -f "$MODEL_PATH" ]; then
37
+ echo "❌ CRITICAL: Model file still missing."
38
  exit 1
39
  fi
40
 
41
+ echo "🚀 Starting Isam's Nur Brain on Port 7860..."
42
 
43
  # Start the API
44
  exec uvicorn app.main:app --host 0.0.0.0 --port 7860