Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
machineuser
commited on
Commit
·
432e973
1
Parent(s):
089313b
Sync widgets demo
Browse files
packages/tasks/src/model-libraries-snippets.ts
CHANGED
@@ -153,6 +153,14 @@ model = from_pretrained_keras("${model.id}")
|
|
153 |
`,
|
154 |
];
|
155 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
export const open_clip = (model: ModelData): string[] => [
|
157 |
`import open_clip
|
158 |
|
|
|
153 |
`,
|
154 |
];
|
155 |
|
156 |
+
export const keras_nlp = (model: ModelData): string[] => [
|
157 |
+
`import keras_nlp
|
158 |
+
|
159 |
+
tokenizer = keras_nlp.models.Tokenizer.from_preset("hf://${model.id}")
|
160 |
+
backbone = keras_nlp.models.Backbone.from_preset("hf://${model.id}")
|
161 |
+
`,
|
162 |
+
];
|
163 |
+
|
164 |
export const open_clip = (model: ModelData): string[] => [
|
165 |
`import open_clip
|
166 |
|
packages/tasks/src/model-libraries.ts
CHANGED
@@ -190,6 +190,7 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
190 |
repoName: "KerasNLP",
|
191 |
repoUrl: "https://keras.io/keras_nlp/",
|
192 |
docsUrl: "https://github.com/keras-team/keras-nlp",
|
|
|
193 |
},
|
194 |
k2: {
|
195 |
prettyLabel: "K2",
|
|
|
190 |
repoName: "KerasNLP",
|
191 |
repoUrl: "https://keras.io/keras_nlp/",
|
192 |
docsUrl: "https://github.com/keras-team/keras-nlp",
|
193 |
+
snippets: snippets.keras_nlp,
|
194 |
},
|
195 |
k2: {
|
196 |
prettyLabel: "K2",
|