Spaces:
Running
on
Zero
Running
on
Zero
File size: 433 Bytes
9037686 0d45a57 dc6f4e4 9dd94af dc6f4e4 9dd94af 0d45a57 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import os
from huggingface_hub import InferenceClient
client = InferenceClient("black-forest-labs/FLUX.1-dev", token=os.getenv('HF_TOKEN'))
client.headers["x-use-cache"] = "0"
def feifeifluxapi(prompt="the photo is a jpop girl",height=1152,width=896,guidance_scale=3.5):
image = client.text_to_image(
prompt=prompt,
height=height,
width=width,
guidance_scale=guidance_scale
)
return image |