Spaces:
Runtime error
Runtime error
Nuzaim Noushad Thappi commited on
fix: source page number
Browse filesfixed source page number starting from 0
97 unmodified lines989910010110210310497 unmodified linesllm_response = qa_chain_instrucEmbed(query)res = wrap_text_preserve_newlines(llm_response['result'])source = [[item.metadata.get('source')[10:-4], item.metadata.get('page')] for item in llm_response['source_documents']]print(res)index_helpful_answer = res.find("Answer:")97 unmodified lines989910010110210310497 unmodified linesllm_response = qa_chain_instrucEmbed(query)res = wrap_text_preserve_newlines(llm_response['result'])source = [[item.metadata.get('source')[10:-4], item.metadata.get('page')+1] for item in llm_response['source_documents']]print(res)index_helpful_answer = res.find("Answer:")
app.py+1-1