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