datacipen commited on
Commit
81fd7ab
1 Parent(s): ab4049b

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +9 -9
main.py CHANGED
@@ -52,18 +52,18 @@ def LLModel():
52
 
53
  def VectorDatabase(categorie):
54
  if categorie != "year":
55
- os.environ['PINECONE_API_KEY'] = ""
56
- os.environ['PINECONE_API_KEY'] = os.getenv('PINECONE_API_KEY')
57
  index_name = "all-venus"
 
 
 
 
58
  else:
59
- os.environ['PINECONE_API_KEY'] = ""
60
- os.environ['PINECONE_API_KEY'] = os.getenv('PINECONE_API_KEYJDLP')
61
  index_name = "all-jdlp"
62
-
63
- embeddings = HuggingFaceEmbeddings()
64
- vectorstore = PineconeVectorStore(
65
- index_name=index_name, embedding=embeddings
66
- )
67
  return vectorstore
68
 
69
  def Retriever(categorie):
 
52
 
53
  def VectorDatabase(categorie):
54
  if categorie != "year":
 
 
55
  index_name = "all-venus"
56
+ embeddings = HuggingFaceEmbeddings()
57
+ vectorstore = PineconeVectorStore(
58
+ index_name=index_name, embedding=embeddings, pinecone_api_key=os.getenv('PINECONE_API_KEY')
59
+ )
60
  else:
 
 
61
  index_name = "all-jdlp"
62
+ embeddings = HuggingFaceEmbeddings()
63
+ vectorstore = PineconeVectorStore(
64
+ index_name=index_name, embedding=embeddings, pinecone_api_key=os.getenv('PINECONE_API_KEYJDLP')
65
+ )
66
+
67
  return vectorstore
68
 
69
  def Retriever(categorie):