Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
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="""
|