Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -86,7 +86,7 @@ def generate(
|
|
| 86 |
output_type="battery",
|
| 87 |
).images
|
| 88 |
|
| 89 |
-
return output
|
| 90 |
|
| 91 |
|
| 92 |
@spaces.GPU
|
|
@@ -126,7 +126,7 @@ def img2img_generate(
|
|
| 126 |
output_type="battery",
|
| 127 |
).images
|
| 128 |
|
| 129 |
-
return output
|
| 130 |
|
| 131 |
|
| 132 |
examples = [
|
|
@@ -264,7 +264,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 264 |
steps,
|
| 265 |
number_image,
|
| 266 |
],
|
| 267 |
-
outputs=[result],
|
| 268 |
api_name="run",
|
| 269 |
)
|
| 270 |
|
|
@@ -296,7 +296,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 296 |
strength,
|
| 297 |
number_image,
|
| 298 |
],
|
| 299 |
-
outputs=[img2img_output],
|
| 300 |
api_name="img2img_run",
|
| 301 |
)
|
| 302 |
|
|
@@ -308,13 +308,11 @@ with gr.Blocks(css=css) as demo:
|
|
| 308 |
</p>
|
| 309 |
"""
|
| 310 |
)
|
| 311 |
-
generated_table = gr.
|
| 312 |
headers=["Prompt", "Seed", "Image"],
|
| 313 |
-
|
| 314 |
col_count=(3, "fixed"),
|
| 315 |
-
|
| 316 |
-
show_label=False,
|
| 317 |
-
elem_id="generated-table",
|
| 318 |
)
|
| 319 |
|
| 320 |
if __name__ == "__main__":
|
|
|
|
| 86 |
output_type="battery",
|
| 87 |
).images
|
| 88 |
|
| 89 |
+
return output, [[prompt, seed, output[0]]]
|
| 90 |
|
| 91 |
|
| 92 |
@spaces.GPU
|
|
|
|
| 126 |
output_type="battery",
|
| 127 |
).images
|
| 128 |
|
| 129 |
+
return output, [[prompt, seed, output[0]]]
|
| 130 |
|
| 131 |
|
| 132 |
examples = [
|
|
|
|
| 264 |
steps,
|
| 265 |
number_image,
|
| 266 |
],
|
| 267 |
+
outputs=[result, generated_table],
|
| 268 |
api_name="run",
|
| 269 |
)
|
| 270 |
|
|
|
|
| 296 |
strength,
|
| 297 |
number_image,
|
| 298 |
],
|
| 299 |
+
outputs=[img2img_output, generated_table],
|
| 300 |
api_name="img2img_run",
|
| 301 |
)
|
| 302 |
|
|
|
|
| 308 |
</p>
|
| 309 |
"""
|
| 310 |
)
|
| 311 |
+
generated_table = gr.Dataframe(
|
| 312 |
headers=["Prompt", "Seed", "Image"],
|
| 313 |
+
datatype=["str", "number", "image"],
|
| 314 |
col_count=(3, "fixed"),
|
| 315 |
+
row_count=1,
|
|
|
|
|
|
|
| 316 |
)
|
| 317 |
|
| 318 |
if __name__ == "__main__":
|