File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,24 @@ export const diffusers = (model: ModelData): string[] => {
96
96
}
97
97
} ;
98
98
99
+ export const edsnlp = ( model : ModelData ) : string [ ] => {
100
+ const packageName = nameWithoutNamespace ( model . id ) . replaceAll ( "-" , "_" ) ;
101
+ return [
102
+ `# Load it from the huggingface hub directly
103
+ import edsnlp
104
+ nlp = edsnlp.load("${ model . id } ")
105
+ ` ,
106
+ `# Or install it as a package
107
+ !pip install git+https://huggingface.co/${ model . id }
108
+
109
+ # and import it as a module
110
+ import ${ packageName }
111
+
112
+ nlp = ${ packageName } .load() # or edsnlp.load("${ packageName } ")
113
+ ` ,
114
+ ] ;
115
+ } ;
116
+
99
117
export const espnetTTS = ( model : ModelData ) : string [ ] => [
100
118
`from espnet2.bin.tts_inference import Text2Speech
101
119
Original file line number Diff line number Diff line change @@ -125,6 +125,16 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
125
125
repoName : "doctr" ,
126
126
repoUrl : "https://github.com/mindee/doctr" ,
127
127
} ,
128
+ edsnlp : {
129
+ prettyLabel : "EDS-NLP" ,
130
+ repoName : "edsnlp" ,
131
+ repoUrl : "https://github.com/aphp/edsnlp" ,
132
+ filter : false ,
133
+ snippets : snippets . edsnlp ,
134
+ countDownloads : {
135
+ wildcard : { path : "*/config.cfg" } ,
136
+ } ,
137
+ } ,
128
138
elm : {
129
139
prettyLabel : "ELM" ,
130
140
repoName : "elm" ,
You can’t perform that action at this time.
0 commit comments