zac commited on
Commit
8833e69
·
1 Parent(s): f968745

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -6,17 +6,14 @@ from llama_cpp import Llama
6
  from huggingface_hub import hf_hub_download #load from huggingfaces
7
 
8
 
9
- llm = Llama(model_path= hf_hub_download(repo_id="TheBloke/airoboros-l2-13b-gpt4-m2.0-GGML", filename="airoboros-l2-13b-gpt4-m2.0.ggmlv3.q6_K.bin"), n_ctx=2048) #download model from hf/ n_ctx=2048 for high ccontext length
10
 
11
  history = []
12
 
13
  def generate_text(input_text, history):
14
  print("history ",history)
15
  print("input ", input_text)
16
- full_conversation = f"{full_conversation[-1]} Q: {input_text} \n A:"
17
- print("full convo", full_conversation)
18
-
19
- output = llm(full_conversation, max_tokens=1024, stop=["Q:", "\n"], echo=True)
20
  response = output['choices'][0]['text']
21
  return response
22
 
 
6
  from huggingface_hub import hf_hub_download #load from huggingfaces
7
 
8
 
9
+ 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
10
 
11
  history = []
12
 
13
  def generate_text(input_text, history):
14
  print("history ",history)
15
  print("input ", input_text)
16
+ output = llm(input_text, max_tokens=1024, stop=["Q:", "\n"], echo=True)
 
 
 
17
  response = output['choices'][0]['text']
18
  return response
19