pabloce commited on
Commit
98758c3
·
verified ·
1 Parent(s): b5c263a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -9,7 +9,7 @@ from llama_cpp_agent.providers import LlamaCppPythonProvider
9
 
10
  subprocess.run('pip install llama-cpp-python --no-build-isolation --no-cache-dir --force-reinstall --upgrade', env={'CMAKE_ARGS': "-DLLAMA_CUBLAS=ON", 'FORCE_CMAKE': '1'}, shell=True)
11
 
12
- hf_hub_download(repo_id="TheBloke/Mistral-7B-Instruct-v0.2-GGUF", filename="mistral-7b-instruct-v0.2.Q6_K.gguf")
13
 
14
  @spaces.GPU
15
  def respond(
@@ -20,7 +20,7 @@ def respond(
20
  temperature,
21
  top_p,
22
  ):
23
- llama_model = Llama(r"mistral-7b-instruct-v0.2.Q6_K.gguf", n_batch=1024, n_threads=0, n_gpu_layers=33, n_ctx=8192, verbose=False)
24
 
25
  provider = LlamaCppPythonProvider(llama_model)
26
 
 
9
 
10
  subprocess.run('pip install llama-cpp-python --no-build-isolation --no-cache-dir --force-reinstall --upgrade', env={'CMAKE_ARGS': "-DLLAMA_CUBLAS=ON", 'FORCE_CMAKE': '1'}, shell=True)
11
 
12
+ hf_hub_download(repo_id="TheBloke/Mistral-7B-Instruct-v0.2-GGUF", filename="mistral-7b-instruct-v0.2.Q6_K.gguf", local_dir = "./models")
13
 
14
  @spaces.GPU
15
  def respond(
 
20
  temperature,
21
  top_p,
22
  ):
23
+ llama_model = Llama(r"models/mistral-7b-instruct-v0.2.Q6_K.gguf", n_batch=1024, n_threads=0, n_gpu_layers=33, n_ctx=8192, verbose=False)
24
 
25
  provider = LlamaCppPythonProvider(llama_model)
26