TobDeBer commited on
Commit
ac3b484
·
1 Parent(s): 3488d23

use CPU version of llama-cpp-python

Browse files
Files changed (2) hide show
  1. app.py +3 -2
  2. requirements.txt +1 -1
app.py CHANGED
@@ -1,4 +1,6 @@
1
- import spaces
 
 
2
  import os
3
  import json
4
  import subprocess
@@ -31,7 +33,6 @@ hf_hub_download(
31
  llm = None
32
  llm_model = None
33
 
34
- @spaces.GPU(duration=120)
35
  def respond(
36
  message,
37
  history: list[tuple[str, str]],
 
1
+ # conda activate audio
2
+ # pip install llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
3
+ import llama_cpp
4
  import os
5
  import json
6
  import subprocess
 
33
  llm = None
34
  llm_model = None
35
 
 
36
  def respond(
37
  message,
38
  history: list[tuple[str, str]],
requirements.txt CHANGED
@@ -1,5 +1,5 @@
1
  spaces
2
  huggingface_hub
3
  scikit-build-core
4
- https://github.com/abetlen/llama-cpp-python/releases/download/v0.2.81-cu124/llama_cpp_python-0.2.81-cp310-cp310-linux_x86_64.whl
5
  llama-cpp-agent>=0.2.25
 
1
  spaces
2
  huggingface_hub
3
  scikit-build-core
4
+ llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu -C cmake.args="-DGGML_BLAS=ON;-DGGML_BLAS_VENDOR=OpenBLAS"
5
  llama-cpp-agent>=0.2.25