Demo_Chat_domsdatabasen / embedding.py
AyoubChLin's picture
[INIT]
488f910
raw
history blame
275 Bytes
from langchain.embeddings import HuggingFaceInferenceAPIEmbeddings
from dotenv import load_dotenv
import os
load_dotenv()
embeddings = HuggingFaceInferenceAPIEmbeddings(
api_key=os.getenv("HUGGINGFACEHUB_API_TOKEN"), model_name="sentence-transformers/all-MiniLM-L6-v2"
)