Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -180,7 +180,11 @@ def chatbot(query):
|
|
| 180 |
# Process the most relevant chunk with QA
|
| 181 |
# result_in_russian = qa_chain.run(input_documents=[{"text": most_relevant_section}], question=query_in_russian)
|
| 182 |
#result_in_russian = qa_chain.run(input_documents=[Document(page_content=most_relevant_section)], question=query_in_russian)
|
| 183 |
-
result_in_russian = qa_chain.run(input_documents=[{"context": most_relevant_section}], question=query_in_russian)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 184 |
|
| 185 |
# Translate answer back to the original language as best as we can
|
| 186 |
# final_answer = translate_answer_back(result_in_russian, query_language)
|
|
|
|
| 180 |
# Process the most relevant chunk with QA
|
| 181 |
# result_in_russian = qa_chain.run(input_documents=[{"text": most_relevant_section}], question=query_in_russian)
|
| 182 |
#result_in_russian = qa_chain.run(input_documents=[Document(page_content=most_relevant_section)], question=query_in_russian)
|
| 183 |
+
#result_in_russian = qa_chain.run(input_documents=[{"context": most_relevant_section}], question=query_in_russian)
|
| 184 |
+
result_in_russian = qa_chain.run(
|
| 185 |
+
input_documents=[Document(page_content=most_relevant_section)],
|
| 186 |
+
question=query_in_russian
|
| 187 |
+
)
|
| 188 |
|
| 189 |
# Translate answer back to the original language as best as we can
|
| 190 |
# final_answer = translate_answer_back(result_in_russian, query_language)
|