Spaces:
Sleeping
Sleeping
Update QnA.py
Browse files
QnA.py
CHANGED
@@ -16,8 +16,7 @@ load_dotenv()
|
|
16 |
def prompt_template_to_analyze_resume():
|
17 |
template = """
|
18 |
You are provided with the Resume of the Candidate in the context below . As an Talent Aquistion bot , your task is to provide insights about the
|
19 |
-
candidate in point wise.
|
20 |
-
Do not make up answers.
|
21 |
|
22 |
\n\n:{context}
|
23 |
"""
|
@@ -84,6 +83,6 @@ def Q_A(vectorstore,question,API_KEY):
|
|
84 |
else:
|
85 |
question_answer_chain = create_stuff_documents_chain(chat_llm, prompt_template_to_analyze_resume())
|
86 |
|
87 |
-
chain = create_retrieval_chain(
|
88 |
result = chain.invoke({'input':question})
|
89 |
return result['answer']
|
|
|
16 |
def prompt_template_to_analyze_resume():
|
17 |
template = """
|
18 |
You are provided with the Resume of the Candidate in the context below . As an Talent Aquistion bot , your task is to provide insights about the
|
19 |
+
candidate in point wise. Mention his skills and experience higlighting his strength and wekaness.
|
|
|
20 |
|
21 |
\n\n:{context}
|
22 |
"""
|
|
|
83 |
else:
|
84 |
question_answer_chain = create_stuff_documents_chain(chat_llm, prompt_template_to_analyze_resume())
|
85 |
|
86 |
+
chain = create_retrieval_chain(compression_retriever, question_answer_chain)
|
87 |
result = chain.invoke({'input':question})
|
88 |
return result['answer']
|