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