Manglik-R commited on
Commit
424eb81
·
verified ·
1 Parent(s): cce806d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -33,7 +33,7 @@ def pdf_changes(pdf_doc):
33
 
34
  llm = Replicate(
35
  model="a16z-infra/llama13b-v2-chat:df7690f1994d94e96ad9d568eac121aecf50684a0b0963b25a41cc40061269e5",
36
- input={"temperature": 0.4, "max_length": 3000, "length_penalty":0.1, "num_beams":3}
37
  )
38
  global qa
39
  qa = ConversationalRetrievalChain.from_llm(
@@ -46,7 +46,7 @@ def pdf_changes(pdf_doc):
46
 
47
  def query(history, text):
48
  result = qa({'question': text, 'chat_history': history})
49
- new_history = history + [(text,result['answer'])]
50
  return new_history,""
51
 
52
  css="""
 
33
 
34
  llm = Replicate(
35
  model="a16z-infra/llama13b-v2-chat:df7690f1994d94e96ad9d568eac121aecf50684a0b0963b25a41cc40061269e5",
36
+ input={"temperature": 0.5, "max_length": 3000, "length_penalty":0.2, "num_beams":3}
37
  )
38
  global qa
39
  qa = ConversationalRetrievalChain.from_llm(
 
46
 
47
  def query(history, text):
48
  result = qa({'question': text, 'chat_history': history})
49
+ new_history = history + [tuple((text,result['answer']))]
50
  return new_history,""
51
 
52
  css="""