nihardon commited on
Commit
c40f1e8
·
verified ·
1 Parent(s): bba1405

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -1,3 +1,5 @@
 
 
1
  import gradio as gr
2
  from huggingface_hub import hf_hub_download
3
  from llama_cpp import Llama
@@ -7,13 +9,15 @@ model_path = hf_hub_download(
7
  filename="llama-3-8b.Q4_K_M.gguf",
8
  )
9
 
 
10
  # Load the model (CPU optimized)
11
  llm = Llama(
12
  model_path=model_path,
13
  n_ctx=2048,
14
- n_threads=2,
 
15
  )
16
-
17
  def generate_test(user_code):
18
  prompt = f"""Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
19
 
 
1
+ print("starting")
2
+
3
  import gradio as gr
4
  from huggingface_hub import hf_hub_download
5
  from llama_cpp import Llama
 
9
  filename="llama-3-8b.Q4_K_M.gguf",
10
  )
11
 
12
+ print("downloading model")
13
  # Load the model (CPU optimized)
14
  llm = Llama(
15
  model_path=model_path,
16
  n_ctx=2048,
17
+ n_threads=2,
18
+ verbose = True
19
  )
20
+ print("loading model")
21
  def generate_test(user_code):
22
  prompt = f"""Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
23