Update app.py
Browse files
app.py
CHANGED
@@ -111,7 +111,7 @@ def talk2file(index_name, text):
|
|
111 |
init_pinecone()
|
112 |
embeddings = OpenAIEmbeddings(openai_api_key=os.environ['OPENAI_API_KEY'])
|
113 |
docsearch = Pinecone.from_existing_index(index_name, embeddings)
|
114 |
-
docs = docsearch.similarity_search(
|
115 |
|
116 |
|
117 |
prompt = text + ", based on the following text: \n\n" + docs[0].page_content
|
|
|
111 |
init_pinecone()
|
112 |
embeddings = OpenAIEmbeddings(openai_api_key=os.environ['OPENAI_API_KEY'])
|
113 |
docsearch = Pinecone.from_existing_index(index_name, embeddings)
|
114 |
+
docs = docsearch.similarity_search(text)
|
115 |
|
116 |
|
117 |
prompt = text + ", based on the following text: \n\n" + docs[0].page_content
|