Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ def query_from_pinecone(index,namespace, question_embedding, top_k=3):
|
|
29 |
QUESTION=st.text_area('Ask a question -e.g How to prepare for Verbal section for CAT?') ##' How to prepare for Verbal section ?'
|
30 |
question_embedding = bi_encoder.encode(QUESTION, convert_to_tensor=True)
|
31 |
resp= query_from_pinecone(index,NAMESPACE, question_embedding.tolist(), 3)
|
32 |
-
|
33 |
#+ '\n*************\n'+ resp[1]['metadata']['text'] + '\n*************\n'+ resp[2]['metadata']['text']
|
34 |
|
35 |
st.json(out)
|
|
|
29 |
QUESTION=st.text_area('Ask a question -e.g How to prepare for Verbal section for CAT?') ##' How to prepare for Verbal section ?'
|
30 |
question_embedding = bi_encoder.encode(QUESTION, convert_to_tensor=True)
|
31 |
resp= query_from_pinecone(index,NAMESPACE, question_embedding.tolist(), 3)
|
32 |
+
out= resp[0]['metadata']['text']
|
33 |
#+ '\n*************\n'+ resp[1]['metadata']['text'] + '\n*************\n'+ resp[2]['metadata']['text']
|
34 |
|
35 |
st.json(out)
|