Hug0endob commited on
Commit
d94b3e3
·
verified ·
1 Parent(s): b937131

Update start.sh

Browse files
Files changed (1) hide show
  1. start.sh +7 -11
start.sh CHANGED
@@ -1,18 +1,14 @@
1
  #!/bin/bash
2
  set -euo pipefail
 
3
 
4
- # where model will be stored
5
- MODEL_DIR="model"
6
- mkdir -p $MODEL_DIR
7
 
8
- # Download GGUF model if not present (CHANGE URL if you have a preferred GGUF)
9
- GGUF_URL="https://huggingface.co/TheBloke/llama-2-7b-chat-GGUF/resolve/main/llama-2-7b-chat.gguf" # example; may be large
10
- GGUF_FILE="$MODEL_DIR/model.gguf"
11
-
12
- if [ ! -f "$GGUF_FILE" ]; then
13
- echo "Downloading GGUF model (this may be large)..."
14
- curl -L -o "$GGUF_FILE" "$GGUF_URL"
15
  fi
16
 
17
- # Run the web app (python will import llama-cpp-python which builds its wheel at install)
18
  python app.py
 
1
  #!/bin/bash
2
  set -euo pipefail
3
+ mkdir -p model
4
 
5
+ GGUF_URL="https://huggingface.co/mradermacher/llama-joycaption-beta-one-hf-llava-GGUF/resolve/main/llama-joycaption-beta-one-hf-llava-q4_k_m.gguf"
6
+ GGUF_PATH="model/llama-joycaption-q4_k_m.gguf"
 
7
 
8
+ if [ ! -f "$GGUF_PATH" ]; then
9
+ echo "Downloading GGUF model (several GB)..."
10
+ curl -L -C - -o "$GGUF_PATH" "$GGUF_URL"
 
 
 
 
11
  fi
12
 
13
+ # Run app.py (Spaces will normally run python app.py automatically; this script is here if you use it locally)
14
  python app.py