CMLL commited on
Commit
196935a
1 Parent(s): 4572637

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -12
app.py CHANGED
@@ -1,8 +1,4 @@
1
  import subprocess
2
- import os
3
-
4
- # Change directory to /content
5
- os.chdir("/content")
6
 
7
  # Remove the llama.cpp directory if it exists
8
  subprocess.run(["rm", "-rf", "llama.cpp"])
@@ -11,16 +7,10 @@ subprocess.run(["rm", "-rf", "llama.cpp"])
11
  subprocess.run(["git", "clone", "https://github.com/ggerganov/llama.cpp.git"])
12
 
13
  # Change directory to llama.cpp
14
- os.chdir("llama.cpp")
15
-
16
- # Build the project with LLAMA_CUBLAS=1
17
- subprocess.run(["make", "LLAMA_CUBLAS=1"])
18
 
19
  # Download the zephyr-7b-beta model
20
  subprocess.run(["wget", "https://huggingface.co/TheBloke/zephyr-7B-beta-GGUF/resolve/main/zephyr-7b-beta.Q6_K.gguf"])
21
 
22
- # Change directory to /content/llama.cpp
23
- os.chdir("/content/llama.cpp")
24
-
25
  # Run the server
26
- subprocess.run(["./server", "-m", "zephyr-7b-beta.Q6_K.gguf", "-ngl", "9999", "-c", "0", "--port", "12345"])
 
1
  import subprocess
 
 
 
 
2
 
3
  # Remove the llama.cpp directory if it exists
4
  subprocess.run(["rm", "-rf", "llama.cpp"])
 
7
  subprocess.run(["git", "clone", "https://github.com/ggerganov/llama.cpp.git"])
8
 
9
  # Change directory to llama.cpp
10
+ subprocess.run(["make", "LLAMA_CUBLAS=1"], cwd="llama.cpp")
 
 
 
11
 
12
  # Download the zephyr-7b-beta model
13
  subprocess.run(["wget", "https://huggingface.co/TheBloke/zephyr-7B-beta-GGUF/resolve/main/zephyr-7b-beta.Q6_K.gguf"])
14
 
 
 
 
15
  # Run the server
16
+ subprocess.run(["./server", "-m", "zephyr-7b-beta.Q6_K.gguf", "-ngl", "9999", "-c", "0", "--port", "12345"], cwd="llama.cpp")