EDUCHAT-AI / pinecone.py
Zethearc's picture
Create pinecone.py
18d13ab
raw
history blame
378 Bytes
import os
import pinecone
from sentence_transformers import SentenceTransformer
model = SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')
# get API key from app.pinecone.io and environment from console
pinecone.init(
api_key= os.environ.get('PINECONE_API_KEY'),
environment= os.environ.get('PINECONE_ENVIROMENT')
)
index = pinecone.Index('edu-ai-indexes')