Demo_Chat_domsdatabasen / embedding.py
AyoubChLin's picture
Update embedding.py
7be7ab3 verified
raw
history blame contribute delete
293 Bytes
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"
)