Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -52,14 +52,14 @@ def add_text(history, text):
|
|
| 52 |
return history, ""
|
| 53 |
|
| 54 |
def bot(history):
|
| 55 |
-
response = infer(history[-1][0])
|
| 56 |
history[-1][1] = response['result']
|
| 57 |
return history
|
| 58 |
|
| 59 |
-
def infer(question):
|
| 60 |
|
| 61 |
query = question
|
| 62 |
-
result = qa({
|
| 63 |
|
| 64 |
return result
|
| 65 |
|
|
|
|
| 52 |
return history, ""
|
| 53 |
|
| 54 |
def bot(history):
|
| 55 |
+
response = infer(history[-1][0] , history)
|
| 56 |
history[-1][1] = response['result']
|
| 57 |
return history
|
| 58 |
|
| 59 |
+
def infer(question , history):
|
| 60 |
|
| 61 |
query = question
|
| 62 |
+
result = qa({'question': query , 'chat_history': history})
|
| 63 |
|
| 64 |
return result
|
| 65 |
|