File tree Expand file tree Collapse file tree 3 files changed +26
-1
lines changed
Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @huggingface/tasks" ,
33 "packageManager" :
" [email protected] " ,
4- "version" : " 0.18.8 " ,
4+ "version" : " 0.18.9 " ,
55 "description" : " List of ML tasks for huggingface.co/tasks" ,
66 "repository" : " https://github.com/huggingface/huggingface.js.git" ,
77 "publishConfig" : {
Original file line number Diff line number Diff line change @@ -681,6 +681,23 @@ export const paddlenlp = (model: ModelData): string[] => {
681681 }
682682} ;
683683
684+ export const perception_encoder = ( model : ModelData ) : string [ ] => {
685+ const clip_model = `# Use PE-Core models as CLIP models
686+ import core.vision_encoder.pe as pe
687+
688+ model = pe.CLIP.from_config("${ model . id } ", pretrained=True)` ;
689+
690+ const vision_encoder = `# Use any PE model as a vision encoder
691+ import core.vision_encoder.pe as pe
692+
693+ model = pe.VisionTransformer.from_config("${ model . id } ", pretrained=True)` ;
694+
695+ if ( model . id . includes ( "Core" ) )
696+ return [ clip_model , vision_encoder ] ;
697+ else
698+ return [ vision_encoder ] ;
699+ } ;
700+
684701export const pyannote_audio_pipeline = ( model : ModelData ) : string [ ] => [
685702 `from pyannote.audio import Pipeline
686703
Original file line number Diff line number Diff line change @@ -633,6 +633,14 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
633633 filter : true ,
634634 countDownloads : `path:"adapter_config.json"` ,
635635 } ,
636+ "perception-encoder" : {
637+ prettyLabel : "PerceptionEncoder" ,
638+ repoName : "PerceptionModels" ,
639+ repoUrl : "https://github.com/facebookresearch/perception_models" ,
640+ filter : false ,
641+ snippets : snippets . perception_encoder ,
642+ countDownloads : `path_extension:"pt"` ,
643+ } ,
636644 pxia : {
637645 prettyLabel : "pxia" ,
638646 repoName : "pxia" ,
You can’t perform that action at this time.
0 commit comments