Hug0endob commited on
Commit
10d27da
·
verified ·
1 Parent(s): dde45d7

Create start.sh

Browse files
Files changed (1) hide show
  1. start.sh +18 -0
start.sh ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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