Spaces:
Sleeping
Sleeping
use CPU version of llama-cpp-python
Browse files- app.py +3 -2
- requirements.txt +1 -1
app.py
CHANGED
@@ -1,4 +1,6 @@
|
|
1 |
-
|
|
|
|
|
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.
|
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
|