Spaces:
Sleeping
Sleeping
up
Browse files
app.py
CHANGED
|
@@ -17,6 +17,10 @@ from Gradio_UI import GradioUI
|
|
| 17 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 18 |
@tool
|
| 19 |
def inference_image_tool(prompt: str, model: str = "black-forest-labs/FLUX.1-dev") -> "Image.Image":
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
token = os.getenv("HF_TOKEN")
|
| 21 |
if not token:
|
| 22 |
raise RuntimeError("HF_TOKEN is missing. Add it in Space Settings → Secrets.")
|
|
|
|
| 17 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 18 |
@tool
|
| 19 |
def inference_image_tool(prompt: str, model: str = "black-forest-labs/FLUX.1-dev") -> "Image.Image":
|
| 20 |
+
"""Generate an image from a text prompt using Hugging Face Inference Providers."
|
| 21 |
+
Args:
|
| 22 |
+
prompt: Text prompt for the image.
|
| 23 |
+
model: HF model id (e.g. black-forest-labs/FLUX.1-dev)."""
|
| 24 |
token = os.getenv("HF_TOKEN")
|
| 25 |
if not token:
|
| 26 |
raise RuntimeError("HF_TOKEN is missing. Add it in Space Settings → Secrets.")
|