We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f416a61 commit 46027feCopy full SHA for 46027fe
packages/tasks/src/snippets/python.spec.ts
@@ -90,6 +90,7 @@ for chunk in stream:
90
expect(snippets[0].client).toEqual("huggingface_hub");
91
expect(snippets[0].content).toEqual(`from huggingface_hub import InferenceClient
92
client = InferenceClient("black-forest-labs/FLUX.1-schnell", token="api_token")
93
+
94
# output is a PIL.Image object
95
image = client.text_to_image("Astronaut riding a horse")`);
96
@@ -105,6 +106,7 @@ def query(payload):
105
106
image_bytes = query({
107
"inputs": "Astronaut riding a horse",
108
})
109
110
# You can access the image with PIL.Image for example
111
import io
112
from PIL import Image
0 commit comments