Update app.py
Browse files
app.py
CHANGED
|
@@ -46,15 +46,17 @@ def init_pinecone(index_name):
|
|
| 46 |
def process_file(index_name, docs):
|
| 47 |
#init_pinecone(index_name)
|
| 48 |
embeddings = OpenAIEmbeddings(openai_api_key=os.environ['OPENAI_API_KEY'])
|
| 49 |
-
print(docs)
|
| 50 |
#pipeline='zh_core_web_sm'
|
|
|
|
|
|
|
| 51 |
"""splter = SpacyTextSplitter(chunk_size=1000,chunk_overlap=200)
|
| 52 |
split_text = splter.split_documents(docs)
|
| 53 |
|
| 54 |
for document in split_text:
|
| 55 |
Pinecone.from_documents([document], embeddings, index_name=index_name)"""
|
| 56 |
|
| 57 |
-
return list_pinecone(index_name)
|
| 58 |
|
| 59 |
|
| 60 |
def list_pinecone(index_name):
|
|
|
|
| 46 |
def process_file(index_name, docs):
|
| 47 |
#init_pinecone(index_name)
|
| 48 |
embeddings = OpenAIEmbeddings(openai_api_key=os.environ['OPENAI_API_KEY'])
|
| 49 |
+
print(docs.name)
|
| 50 |
#pipeline='zh_core_web_sm'
|
| 51 |
+
|
| 52 |
+
|
| 53 |
"""splter = SpacyTextSplitter(chunk_size=1000,chunk_overlap=200)
|
| 54 |
split_text = splter.split_documents(docs)
|
| 55 |
|
| 56 |
for document in split_text:
|
| 57 |
Pinecone.from_documents([document], embeddings, index_name=index_name)"""
|
| 58 |
|
| 59 |
+
return #list_pinecone(index_name)
|
| 60 |
|
| 61 |
|
| 62 |
def list_pinecone(index_name):
|