@huggingface/tasks 0.12.6 → 0.12.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/model-libraries-snippets.ts +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4444,7 +4444,7 @@ function get_base_diffusers_model(model) {
|
|
|
4444
4444
|
return model.cardData?.base_model?.toString() ?? "fill-in-base-model";
|
|
4445
4445
|
}
|
|
4446
4446
|
function get_prompt_from_diffusers_model(model) {
|
|
4447
|
-
const prompt =
|
|
4447
|
+
const prompt = model.widgetData?.[0]?.text ?? model.cardData?.instance_prompt;
|
|
4448
4448
|
if (prompt) {
|
|
4449
4449
|
return escapeStringForJson(prompt);
|
|
4450
4450
|
}
|
package/dist/index.js
CHANGED
|
@@ -4406,7 +4406,7 @@ function get_base_diffusers_model(model) {
|
|
|
4406
4406
|
return model.cardData?.base_model?.toString() ?? "fill-in-base-model";
|
|
4407
4407
|
}
|
|
4408
4408
|
function get_prompt_from_diffusers_model(model) {
|
|
4409
|
-
const prompt =
|
|
4409
|
+
const prompt = model.widgetData?.[0]?.text ?? model.cardData?.instance_prompt;
|
|
4410
4410
|
if (prompt) {
|
|
4411
4411
|
return escapeStringForJson(prompt);
|
|
4412
4412
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@huggingface/tasks",
|
|
3
3
|
"packageManager": "pnpm@8.10.5",
|
|
4
|
-
"version": "0.12.
|
|
4
|
+
"version": "0.12.7",
|
|
5
5
|
"description": "List of ML tasks for huggingface.co/tasks",
|
|
6
6
|
"repository": "https://github.com/huggingface/huggingface.js.git",
|
|
7
7
|
"publishConfig": {
|
|
@@ -74,7 +74,7 @@ function get_base_diffusers_model(model: ModelData): string {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
function get_prompt_from_diffusers_model(model: ModelData): string | undefined {
|
|
77
|
-
const prompt = (model.widgetData?.[0] as WidgetExampleTextInput)
|
|
77
|
+
const prompt = (model.widgetData?.[0] as WidgetExampleTextInput | undefined)?.text ?? model.cardData?.instance_prompt;
|
|
78
78
|
if (prompt) {
|
|
79
79
|
return escapeStringForJson(prompt);
|
|
80
80
|
}
|