Spaces:
Runtime error
Runtime error
Update app.py (#1)
Browse files- Update app.py (983c999b75e7ddb6c3c54816a94f8fa205ca8353)
app.py
CHANGED
@@ -1,7 +1,10 @@
|
|
1 |
import gradio as gr
|
2 |
from llama_cpp import Llama
|
3 |
|
4 |
-
|
|
|
|
|
|
|
5 |
|
6 |
def generate_text(prompt):
|
7 |
output = llm(prompt, max_tokens=468, temperature=0.1, top_p=0.5, echo=False, stop=["#"])
|
|
|
1 |
import gradio as gr
|
2 |
from llama_cpp import Llama
|
3 |
|
4 |
+
import os
|
5 |
+
os.system('CMAKE_ARGS="-DLLAMA_OPENBLAS=on" FORCE_CMAKE=1 pip install llama-cpp-python')
|
6 |
+
|
7 |
+
llm = Llama(model_path="eachadea_ggml-vic7b-q4_0.bin", n_ctx=2048, n_batch=126)
|
8 |
|
9 |
def generate_text(prompt):
|
10 |
output = llm(prompt, max_tokens=468, temperature=0.1, top_p=0.5, echo=False, stop=["#"])
|