Revert to compile error
Browse files
start.py
CHANGED
@@ -1,17 +1,11 @@
|
|
1 |
import subprocess
|
2 |
-
import sys
|
3 |
|
4 |
# Uninstall the existing llama-cpp-python package
|
5 |
-
#
|
6 |
-
# subprocess.run(uninstall_command, shell=True)
|
7 |
|
8 |
# Install llama-cpp-python with CUDA support
|
9 |
-
install_command =
|
10 |
-
install_command_cmake_args = ["CMAKE_ARGS=-DLLAMA_CUBLAS=on" + " FORCE_CMAKE=1"]
|
11 |
-
install_command_cmake_args.extend(install_command)
|
12 |
subprocess.run(install_command, shell=True)
|
13 |
|
14 |
# Start the Hugging Face Space
|
15 |
-
|
16 |
-
subprocess.run(uvicorn_command, shell=True)
|
17 |
-
subprocess.run(install_command, shell=True)
|
|
|
1 |
import subprocess
|
|
|
2 |
|
3 |
# Uninstall the existing llama-cpp-python package
|
4 |
+
# subprocess.run("pip uninstall -y llama-cpp-python", shell=True)
|
|
|
5 |
|
6 |
# Install llama-cpp-python with CUDA support
|
7 |
+
install_command = "CMAKE_ARGS='-DLLAMA_CUDA=on' pip install llama-cpp-python"
|
|
|
|
|
8 |
subprocess.run(install_command, shell=True)
|
9 |
|
10 |
# Start the Hugging Face Space
|
11 |
+
subprocess.run("uvicorn app:app --host 0.0.0.0 --port 7860", shell=True)
|
|
|
|