Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -1,7 +1,10 @@
1
  import gradio as gr
2
  from llama_cpp import Llama
3
 
4
- llm = Llama(model_path="eachadea_ggml-vic7b-q4_0.bin", n_ctx=2048)
 
 
 
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=["#"])