File size: 293 Bytes
7be7ab3
488f910
 
 
27901ec
 
488f910
27901ec
488f910
1
2
3
4
5
6
7
8
9
from langchain.embeddings import HuggingFaceInferenceAPIEmbeddings
from dotenv import load_dotenv
import os

load_dotenv()
api_key = os.getenv("HUGGINGFACEHUB_API_TOKEN")
embeddings = HuggingFaceInferenceAPIEmbeddings(
    api_key=api_key, model_name="sentence-transformers/all-MiniLM-L6-v2"
)