zac commited on
Commit
4ac82e2
·
1 Parent(s): ee6aea9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -7,7 +7,7 @@ from llama_cpp import Llama
7
  from huggingface_hub import hf_hub_download #load from huggingfaces
8
 
9
 
10
- llm = Llama(model_path= hf_hub_download(repo_id="TheBloke/Vigogne-2-7B-Chat-GGML", filename="vigogne-2-7b-chat.ggmlv3.q4_1.bin"), n_ctx=2048) #download model from hf/ n_ctx=2048 for high ccontext length
11
 
12
  history = []
13
 
@@ -17,7 +17,7 @@ def generate_text(input_text, history):
17
  if history == []:
18
  input_text_with_history = f"Q: {input_text} \n A:"
19
  else:
20
- input_text_with_history = history[-1][1]+ "\n"
21
  input_text_with_history += f"Q: {input_text} \n A:"
22
  print("new input", input_text_with_history)
23
  output = llm(input_text_with_history, max_tokens=1024, stop=["Q:", "\n"], stream=True)
 
7
  from huggingface_hub import hf_hub_download #load from huggingfaces
8
 
9
 
10
+ llm = Llama(model_path= hf_hub_download(repo_id="TheBloke/orca_mini_3B-GGML", filename="orca-mini-3b.ggmlv3.q4_1.bin"), n_ctx=2048) #download model from hf/ n_ctx=2048 for high ccontext length
11
 
12
  history = []
13
 
 
17
  if history == []:
18
  input_text_with_history = f"Q: {input_text} \n A:"
19
  else:
20
+ input_text_with_history = f"{history[-1][1]}"+ "\n"
21
  input_text_with_history += f"Q: {input_text} \n A:"
22
  print("new input", input_text_with_history)
23
  output = llm(input_text_with_history, max_tokens=1024, stop=["Q:", "\n"], stream=True)