Update app.py
Browse files
app.py
CHANGED
@@ -58,8 +58,8 @@ if load_button:
|
|
58 |
|
59 |
embeddings=create_embeddings()
|
60 |
st.write("π§ Model ready to understand your queries!")
|
61 |
-
|
62 |
-
push_to_pinecone(
|
63 |
st.write("π Data loaded into Pinecone for quick searching!")
|
64 |
|
65 |
st.sidebar.success("π Data successfully loaded into Pinecone!")
|
@@ -77,8 +77,8 @@ if submit:
|
|
77 |
|
78 |
embeddings=create_embeddings()
|
79 |
st.write("π§ Model ready to understand your queries!")
|
80 |
-
|
81 |
-
index=pull_from_pinecone(
|
82 |
st.write("π Database retrieval is done!")
|
83 |
|
84 |
relavant_docs=get_similar_docs(index,prompt,document_count)
|
|
|
58 |
|
59 |
embeddings=create_embeddings()
|
60 |
st.write("π§ Model ready to understand your queries!")
|
61 |
+
PINECONE_API=os.getenv('PINECONE_API')
|
62 |
+
push_to_pinecone(PINECONE_API,constants.PINECONE_ENVIRONMENT,constants.PINECONE_INDEX,embeddings,chunks_data)
|
63 |
st.write("π Data loaded into Pinecone for quick searching!")
|
64 |
|
65 |
st.sidebar.success("π Data successfully loaded into Pinecone!")
|
|
|
77 |
|
78 |
embeddings=create_embeddings()
|
79 |
st.write("π§ Model ready to understand your queries!")
|
80 |
+
PINECONE_API=os.getenv('PINECONE_API')
|
81 |
+
index=pull_from_pinecone(PINECONE_API,constants.PINECONE_ENVIRONMENT,constants.PINECONE_INDEX,embeddings)
|
82 |
st.write("π Database retrieval is done!")
|
83 |
|
84 |
relavant_docs=get_similar_docs(index,prompt,document_count)
|