Spaces:
Runtime error
Runtime error
Download pinecone.py from Zethearc/EDUCHAT-AI: direct link, hf CLI and curl.
- Browser
- Download file 378 Bytes
-
https://huggingface.co/spaces/Zethearc/EDUCHAT-AI/resolve/main/pinecone.py
- Command line
-
hf download hf://spaces/Zethearc/EDUCHAT-AI/pinecone.py
-
curl -L -o pinecone.py https://huggingface.co/spaces/Zethearc/EDUCHAT-AI/resolve/main/pinecone.py
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') | |