Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
•
a2828aa
1
Parent(s):
25678ac
add revision
Browse files- load_data.py +4 -1
load_data.py
CHANGED
@@ -24,6 +24,7 @@ load_dotenv()
|
|
24 |
|
25 |
HF_TOKEN = os.getenv("HF_TOKEN")
|
26 |
EMBEDDING_MODEL_NAME = "Snowflake/snowflake-arctic-embed-m-long"
|
|
|
27 |
INFERENCE_MODEL_URL = (
|
28 |
"https://pqzap00ebpl1ydt4.us-east-1.aws.endpoints.huggingface.cloud"
|
29 |
)
|
@@ -49,7 +50,9 @@ def get_chroma_client():
|
|
49 |
def get_embedding_function():
|
50 |
logger.info(f"Initializing embedding function with model: {EMBEDDING_MODEL_NAME}")
|
51 |
return embedding_functions.SentenceTransformerEmbeddingFunction(
|
52 |
-
model_name=EMBEDDING_MODEL_NAME,
|
|
|
|
|
53 |
)
|
54 |
|
55 |
|
|
|
24 |
|
25 |
HF_TOKEN = os.getenv("HF_TOKEN")
|
26 |
EMBEDDING_MODEL_NAME = "Snowflake/snowflake-arctic-embed-m-long"
|
27 |
+
EMBEDDING_MODEL_REVISION = "ac9d0cb43661ee1f7d67b3aa63614d65a6c86463"
|
28 |
INFERENCE_MODEL_URL = (
|
29 |
"https://pqzap00ebpl1ydt4.us-east-1.aws.endpoints.huggingface.cloud"
|
30 |
)
|
|
|
50 |
def get_embedding_function():
|
51 |
logger.info(f"Initializing embedding function with model: {EMBEDDING_MODEL_NAME}")
|
52 |
return embedding_functions.SentenceTransformerEmbeddingFunction(
|
53 |
+
model_name=EMBEDDING_MODEL_NAME,
|
54 |
+
trust_remote_code=True,
|
55 |
+
revision=EMBEDDING_MODEL_REVISION,
|
56 |
)
|
57 |
|
58 |
|