Spaces:
Sleeping
Sleeping
app15
Browse files
app.py
CHANGED
|
@@ -105,10 +105,10 @@ qa_chain = ConversationalRetrievalChain.from_llm(
|
|
| 105 |
)
|
| 106 |
|
| 107 |
|
| 108 |
-
def chat_interface(inputs,chat_history):
|
| 109 |
-
question = inputs["
|
| 110 |
-
chat_history = inputs["
|
| 111 |
-
#
|
| 112 |
result = qa_chain.run({"question": question, "chat_history": chat_history})
|
| 113 |
return result["answer"]
|
| 114 |
|
|
|
|
| 105 |
)
|
| 106 |
|
| 107 |
|
| 108 |
+
def chat_interface(inputs, chat_history):
|
| 109 |
+
question = inputs[0] # Use integer index 0 for the "Question" input
|
| 110 |
+
chat_history = inputs[1] # Use integer index 1 for the "Chat History" input
|
| 111 |
+
# ConversationalRetrievalChain
|
| 112 |
result = qa_chain.run({"question": question, "chat_history": chat_history})
|
| 113 |
return result["answer"]
|
| 114 |
|