m-ric HF staff commited on
Commit
da3004e
1 Parent(s): a52547c

Upload tool

Browse files
Files changed (3) hide show
  1. requirements.txt +1 -1
  2. tool.py +1 -1
  3. tool_config.json +1 -1
requirements.txt CHANGED
@@ -1,2 +1,2 @@
1
- transformers
2
  huggingface_hub
 
 
 
1
  huggingface_hub
2
+ transformers
tool.py CHANGED
@@ -6,7 +6,7 @@ class TextToImageTool(Tool):
6
  default_checkpoint = "runwayml/stable-diffusion-v1-5"
7
  description = "This is a tool that creates an image according to a prompt, which is a text description."
8
  name = "image_generator"
9
- inputs = {"prompt": {"type": "text", "description": "the image description"}}
10
  output_type = "image"
11
  model_sdxl = "stabilityai/stable-diffusion-xl-base-1.0"
12
  client = InferenceClient(model_sdxl)
 
6
  default_checkpoint = "runwayml/stable-diffusion-v1-5"
7
  description = "This is a tool that creates an image according to a prompt, which is a text description."
8
  name = "image_generator"
9
+ inputs = {"prompt": {"type": "text", "description": "The image generator prompt. Don't hesitate to add details in the prompt to make the image look better, like 'high-res, photorealistic', etc."}}
10
  output_type = "image"
11
  model_sdxl = "stabilityai/stable-diffusion-xl-base-1.0"
12
  client = InferenceClient(model_sdxl)
tool_config.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "description": "This is a tool that creates an image according to a prompt, which is a text description.",
3
- "inputs": "{'prompt': {'type': 'text', 'description': 'the image description'}}",
4
  "name": "image_generator",
5
  "output_type": "image",
6
  "tool_class": "tool.TextToImageTool"
 
1
  {
2
  "description": "This is a tool that creates an image according to a prompt, which is a text description.",
3
+ "inputs": "{'prompt': {'type': 'text', 'description': \"The image generator prompt. Don't hesitate to add details in the prompt to make the image look better, like 'high-res, photorealistic', etc.\"}}",
4
  "name": "image_generator",
5
  "output_type": "image",
6
  "tool_class": "tool.TextToImageTool"