File size: 315 Bytes
637614a
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
from huggingface_hub import InferenceClient

client = InferenceClient(
    provider="together",
    api_key="30cce3973ee421b57733847e64ae7a67a55307fb7cd4d176303468f812582a24",
)

# output is a PIL.Image object
image = client.text_to_image(
    "Astronaut riding a horse",
    model="black-forest-labs/FLUX.1-dev",
)