File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
packages/tasks/src/snippets Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,8 @@ import type { InferenceSnippet, ModelDataMinimal } from "./types.js";
66
77const snippetImportInferenceClient = ( model : ModelDataMinimal , accessToken : string ) : string =>
88 `from huggingface_hub import InferenceClient
9- client = InferenceClient("${ model . id } ", token="${ accessToken || "{API_TOKEN}" } ")` ;
9+ client = InferenceClient("${ model . id } ", token="${ accessToken || "{API_TOKEN}" } ")
10+ ` ;
1011
1112export const snippetConversational = (
1213 model : ModelDataMinimal ,
@@ -180,6 +181,7 @@ image = client.text_to_image(${getModelInputSnippet(model)})`,
180181image_bytes = query({
181182 "inputs": ${ getModelInputSnippet ( model ) } ,
182183})
184+
183185# You can access the image with PIL.Image for example
184186import io
185187from PIL import Image
You can’t perform that action at this time.
0 commit comments