Update Modules/Generate_Image.py
Browse files
Modules/Generate_Image.py
CHANGED
|
@@ -28,7 +28,7 @@ TOOL_SUMMARY = (
|
|
| 28 |
)
|
| 29 |
def Generate_Image(
|
| 30 |
prompt: Annotated[str, "Text description of the image to generate."],
|
| 31 |
-
model_id: Annotated[str, "Hugging Face model id in the form 'creator/model-name' (e.g.,
|
| 32 |
negative_prompt: Annotated[str, "What should NOT appear in the image."] = (
|
| 33 |
"(deformed, distorted, disfigured), poorly drawn, bad anatomy, wrong anatomy, extra limb, "
|
| 34 |
"missing limb, floating limbs, (mutated hands and fingers), disconnected limbs, mutation, "
|
|
@@ -91,7 +91,7 @@ def build_interface() -> gr.Interface:
|
|
| 91 |
gr.Textbox(label="Prompt", placeholder="Enter a prompt", lines=2, info="Text description of the image to generate"),
|
| 92 |
gr.Textbox(
|
| 93 |
label="Model",
|
| 94 |
-
value="
|
| 95 |
placeholder="creator/model-name",
|
| 96 |
max_lines=1,
|
| 97 |
info="<a href=\"https://huggingface.co/models?pipeline_tag=text-to-image&inference_provider=nebius,cerebras,novita,fireworks-ai,together,fal-ai,groq,featherless-ai,nscale,hyperbolic,sambanova,cohere,replicate,scaleway,publicai,hf-inference&sort=trending\" target=\"_blank\" rel=\"noopener noreferrer\">Browse models</a>",
|
|
@@ -122,7 +122,7 @@ def build_interface() -> gr.Interface:
|
|
| 122 |
title="Generate Image",
|
| 123 |
description=(
|
| 124 |
"<div style=\"text-align:center\">Generate images via Hugging Face serverless inference. "
|
| 125 |
-
"Default model is
|
| 126 |
),
|
| 127 |
api_description=TOOL_SUMMARY,
|
| 128 |
flagging_mode="never",
|
|
|
|
| 28 |
)
|
| 29 |
def Generate_Image(
|
| 30 |
prompt: Annotated[str, "Text description of the image to generate."],
|
| 31 |
+
model_id: Annotated[str, "Hugging Face model id in the form 'creator/model-name' (e.g., Tongyi-MAI/Z-Image-Turbo)."] = "Tongyi-MAI/Z-Image-Turbo",
|
| 32 |
negative_prompt: Annotated[str, "What should NOT appear in the image."] = (
|
| 33 |
"(deformed, distorted, disfigured), poorly drawn, bad anatomy, wrong anatomy, extra limb, "
|
| 34 |
"missing limb, floating limbs, (mutated hands and fingers), disconnected limbs, mutation, "
|
|
|
|
| 91 |
gr.Textbox(label="Prompt", placeholder="Enter a prompt", lines=2, info="Text description of the image to generate"),
|
| 92 |
gr.Textbox(
|
| 93 |
label="Model",
|
| 94 |
+
value="Tongyi-MAI/Z-Image-Turbo",
|
| 95 |
placeholder="creator/model-name",
|
| 96 |
max_lines=1,
|
| 97 |
info="<a href=\"https://huggingface.co/models?pipeline_tag=text-to-image&inference_provider=nebius,cerebras,novita,fireworks-ai,together,fal-ai,groq,featherless-ai,nscale,hyperbolic,sambanova,cohere,replicate,scaleway,publicai,hf-inference&sort=trending\" target=\"_blank\" rel=\"noopener noreferrer\">Browse models</a>",
|
|
|
|
| 122 |
title="Generate Image",
|
| 123 |
description=(
|
| 124 |
"<div style=\"text-align:center\">Generate images via Hugging Face serverless inference. "
|
| 125 |
+
"Default model is Tongyi-MAI/Z-Image-Turbo.</div>"
|
| 126 |
),
|
| 127 |
api_description=TOOL_SUMMARY,
|
| 128 |
flagging_mode="never",
|