Spaces:
Running
on
Zero
Running
on
Zero
Update feifeilib/feifeifluxapi.py
Browse files
feifeilib/feifeifluxapi.py
CHANGED
@@ -3,6 +3,11 @@ from huggingface_hub import InferenceClient
|
|
3 |
client = InferenceClient("black-forest-labs/FLUX.1-dev", token=os.getenv('HF_TOKEN'))
|
4 |
client.headers["x-use-cache"] = "0"
|
5 |
|
6 |
-
def feifeifluxapi(protmpt):
|
7 |
-
image = client.text_to_image(
|
|
|
|
|
|
|
|
|
|
|
8 |
return image
|
|
|
3 |
client = InferenceClient("black-forest-labs/FLUX.1-dev", token=os.getenv('HF_TOKEN'))
|
4 |
client.headers["x-use-cache"] = "0"
|
5 |
|
6 |
+
def feifeifluxapi(protmpt="the photo is a jpop girl",height=1152,width=896,guidance_scale=3.5):
|
7 |
+
image = client.text_to_image(
|
8 |
+
protmpt=protmpt,
|
9 |
+
height=height,
|
10 |
+
width=width,
|
11 |
+
guidance_scale=guidance_scale
|
12 |
+
)
|
13 |
return image
|