-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a08a739
commit e6cfcb8
Showing
6 changed files
with
33 additions
and
109 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,7 @@ | ||
# -*- coding: utf-8 -*- | ||
from modelcache.utils.lazy_import import LazyImport | ||
huggingface = LazyImport("huggingface", globals(), "modelcache.embedding.huggingface") | ||
data2vec = LazyImport("data2vec", globals(), "modelcache.embedding.data2vec") | ||
llmEmb = LazyImport("llmEmb", globals(), "modelcache.embedding.llmEmb") | ||
fasttext = LazyImport("fasttext", globals(), "modelcache.embedding.fasttext") | ||
paddlenlp = LazyImport("paddlenlp", globals(), "modelcache.embedding.paddlenlp") | ||
timm = LazyImport("timm", globals(), "modelcache.embedding.timm") | ||
clip = LazyImport("clip", globals(), "modelcache_mm.embedding.clip") | ||
|
||
|
||
def Huggingface(model="sentence-transformers/all-mpnet-base-v2"): | ||
return huggingface.Huggingface(model) | ||
|
||
|
||
def Data2VecAudio(model="facebook/data2vec-audio-base-960h"): | ||
return data2vec.Data2VecAudio(model) | ||
|
||
|
||
def LlmEmb2vecAudio(): | ||
return llmEmb.LlmEmb2Vec() | ||
|
||
|
||
def FastText(model="en", dim=None): | ||
return fasttext.FastText(model, dim) | ||
|
||
|
||
def PaddleNLP(model="ernie-3.0-medium-zh"): | ||
return paddlenlp.PaddleNLP(model) | ||
|
||
|
||
def Timm(model="resnet50", device="default"): | ||
return timm.Timm(model, device) | ||
def Clip2Vec(model="damo/multi-modal_clip-vit-base-patch16_zh"): | ||
return clip.ClipAudio(model) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters