Update app.py
Browse files
app.py
CHANGED
@@ -9,9 +9,17 @@ class TextToImageTool(Tool):
|
|
9 |
description = "Generate an image from a text prompt using m-ric/text-to-image."
|
10 |
|
11 |
# `inputs` is a dictionary: argument_name -> type
|
12 |
-
inputs = {"prompt": str}
|
13 |
-
output_type = "image"
|
14 |
-
outputs = {"image": "image"} # Optional, type can be a string or class
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
def __init__(self):
|
17 |
super().__init__()
|
|
|
9 |
description = "Generate an image from a text prompt using m-ric/text-to-image."
|
10 |
|
11 |
# `inputs` is a dictionary: argument_name -> type
|
12 |
+
#inputs = {"prompt": str}
|
13 |
+
#output_type = "image"
|
14 |
+
#outputs = {"image": "image"} # Optional, type can be a string or class
|
15 |
+
|
16 |
+
inputs = {
|
17 |
+
"prompt": {"type": "str"} # Must be a dict, not just a type
|
18 |
+
}
|
19 |
+
output_type = "image"
|
20 |
+
outputs = {
|
21 |
+
"image": "image"
|
22 |
+
}
|
23 |
|
24 |
def __init__(self):
|
25 |
super().__init__()
|