mirror of
https://github.com/BoardWare-Genius/jarvis-models.git
synced 2025-12-13 16:53:24 +00:00
style: convert /home/gpu/ to /
This commit is contained in:
@ -31,9 +31,9 @@ class ChromaUpsert(Blackbox):
|
||||
def __init__(self, *args, **kwargs) -> None:
|
||||
# config = read_yaml(args[0])
|
||||
# load embedding model
|
||||
self.embedding_model_1 = SentenceTransformerEmbeddings(model_name="/home/gpu/Workspace/Models/BAAI/bge-large-zh-v1.5", model_kwargs={"device": "cuda"})
|
||||
self.embedding_model_1 = SentenceTransformerEmbeddings(model_name="/Workspace/Models/BAAI/bge-large-zh-v1.5", model_kwargs={"device": "cuda"})
|
||||
# load chroma db
|
||||
self.client_1 = chromadb.HttpClient(host='10.6.81.119', port=7000)
|
||||
self.client_1 = chromadb.HttpClient(host='192.168.0.200', port=7000)
|
||||
|
||||
def __call__(self, *args, **kwargs):
|
||||
return self.processing(*args, **kwargs)
|
||||
@ -79,7 +79,7 @@ class ChromaUpsert(Blackbox):
|
||||
chroma_collection_id = settings.get("chroma_collection_id")
|
||||
|
||||
if chroma_embedding_model is None or chroma_embedding_model.isspace() or chroma_embedding_model == "":
|
||||
chroma_embedding_model = "/home/gpu/Workspace/Models/BAAI/bge-large-zh-v1.5"
|
||||
chroma_embedding_model = "/Workspace/Models/BAAI/bge-large-zh-v1.5"
|
||||
|
||||
if chroma_host is None or chroma_host.isspace() or chroma_host == "":
|
||||
chroma_host = "10.6.82.192"
|
||||
@ -96,7 +96,7 @@ class ChromaUpsert(Blackbox):
|
||||
else:
|
||||
client = chromadb.HttpClient(host=chroma_host, port=chroma_port)
|
||||
print(f"chroma_embedding_model: {chroma_embedding_model}")
|
||||
if re.search(r"/home/gpu/Workspace/Models/BAAI/bge-large-zh-v1.5", chroma_embedding_model):
|
||||
if re.search(r"/Workspace/Models/BAAI/bge-large-zh-v1.5", chroma_embedding_model):
|
||||
embedding_model = self.embedding_model_1
|
||||
else:
|
||||
embedding_model = SentenceTransformerEmbeddings(model_name=chroma_embedding_model, device = "cuda:0")
|
||||
|
||||
Reference in New Issue
Block a user