Fix error "Model Loading" HuggingFaceEmbedding.py

Thanks to @gio98 by #97
This commit is contained in:
IntelligenzaArtificiale
2023-05-10 14:23:00 +02:00
committed by GitHub
parent 6a7f6015bd
commit ff405bea7e
+2 -1
View File
@@ -10,7 +10,8 @@ if os.environ.get("HUGGINGFACEHUB_API_TOKEN") is not None:
else:
raise Exception("You must provide the huggingface token")
model_id = "sentence-transformers/all-MiniLM-L6-v2"
# model_id = "sentence-transformers/all-MiniLM-L6-v2" NOT WORKING FROM 10/05/2023
model_id = "obrizum/all-MiniLM-L6-v2"
api_url = f"https://api-inference.huggingface.co/pipeline/feature-extraction/{model_id}"
headers = {"Authorization": f"Bearer {hf_token}"}