Skip to content

Commit 15983c5

Browse files
apolinariomishig25
andauthored
Update packages/tasks/src/model-libraries-snippets.ts
Co-authored-by: Mishig <[email protected]>
1 parent 96250ca commit 15983c5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/tasks/src/model-libraries-snippets.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ function get_base_diffusers_model(model: ModelData): string {
7474
}
7575

7676
function get_prompt_from_diffusers_model(model: ModelData): string | undefined {
77-
return (model.widgetData?.[0] as WidgetExampleTextInput).text ?? model.cardData?.instance_prompt;
77+
const prompt = (model.widgetData?.[0] as WidgetExampleTextInput).text ?? model.cardData?.instance_prompt;
78+
if(prompt){
79+
return escapeQuotes(prompt);
80+
}
7881
}
7982

8083
export const bertopic = (model: ModelData): string[] => [

0 commit comments

Comments
 (0)