Skip to content

Commit e4957cd

Browse files
committed
fix tests
1 parent afe30cf commit e4957cd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/tasks/src/snippets/python.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import type { InferenceSnippet, ModelDataMinimal } from "./types.js";
66

77
const 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

1112
export const snippetConversational = (
1213
model: ModelDataMinimal,
@@ -180,6 +181,7 @@ image = client.text_to_image(${getModelInputSnippet(model)})`,
180181
image_bytes = query({
181182
"inputs": ${getModelInputSnippet(model)},
182183
})
184+
183185
# You can access the image with PIL.Image for example
184186
import io
185187
from PIL import Image

0 commit comments

Comments
 (0)