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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -9
app.py CHANGED
@@ -43,18 +43,10 @@ def pdf_changes(pdf_doc):
43
  )
44
  return "Ready"
45
 
46
- def format(query, history):
47
- fhistory = []
48
- for user, bot in history:
49
- fhistory.append(f"User: {user}")
50
- fhistory.append(f"Assistant: {bot}")
51
- return fhistory
52
 
53
  def query(history, text):
54
- fhistory = format(text,history)
55
- result = qa({'question': text, 'chat_history': fhistory})
56
  new_history = history + [(text,result['answer'])]
57
-
58
  return new_history,""
59
 
60
  css="""
 
43
  )
44
  return "Ready"
45
 
 
 
 
 
 
 
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="""