m-ric HF staff commited on
Commit
5097750
1 Parent(s): 12e8eec

Update text_to_image.py

Browse files
Files changed (1) hide show
  1. text_to_image.py +2 -3
text_to_image.py CHANGED
@@ -8,8 +8,7 @@ if is_accelerate_available():
8
  from accelerate import PartialState
9
 
10
  TEXT_TO_IMAGE_DESCRIPTION = (
11
- "This is a tool that creates an image according to a prompt, which is a text description. It takes an input named `prompt` which "
12
- "contains the image description and outputs an image."
13
  )
14
 
15
 
@@ -17,7 +16,7 @@ class TextToImageTool(Tool):
17
  default_checkpoint = "runwayml/stable-diffusion-v1-5"
18
  description = TEXT_TO_IMAGE_DESCRIPTION
19
  name = "image_generator"
20
- inputs = {"prompt": str}
21
  output_type = Image.Image
22
 
23
  def __init__(self, device=None, **hub_kwargs) -> None:
 
8
  from accelerate import PartialState
9
 
10
  TEXT_TO_IMAGE_DESCRIPTION = (
11
+ "This is a tool that creates an image according to a prompt, which is a text description."
 
12
  )
13
 
14
 
 
16
  default_checkpoint = "runwayml/stable-diffusion-v1-5"
17
  description = TEXT_TO_IMAGE_DESCRIPTION
18
  name = "image_generator"
19
+ inputs = {"prompt": {"type": str, "description": "contains the image description and outputs an image"}}
20
  output_type = Image.Image
21
 
22
  def __init__(self, device=None, **hub_kwargs) -> None: