Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -31,10 +31,8 @@ def modify_caption(caption: str) -> str:
|
|
| 31 |
def create_captions_rich(images):
|
| 32 |
"""
|
| 33 |
Generates captions for input images.
|
| 34 |
-
|
| 35 |
Args:
|
| 36 |
images (list): List of images to generate captions for.
|
| 37 |
-
|
| 38 |
Returns:
|
| 39 |
list: List of captions, one for each input image.
|
| 40 |
"""
|
|
@@ -69,10 +67,10 @@ with gr.Blocks(css=css) as demo:
|
|
| 69 |
with gr.Tab(label="Image to Prompt for SD3"):
|
| 70 |
with gr.Row():
|
| 71 |
with gr.Column():
|
| 72 |
-
input_img = gr.
|
| 73 |
submit_btn = gr.Button(value="Start")
|
| 74 |
output = gr.Textbox(label="Prompt", lines=10, interactive=True)
|
| 75 |
|
| 76 |
submit_btn.click(create_captions_rich, [input_img], [output])
|
| 77 |
|
| 78 |
-
demo.launch(debug=True)
|
|
|
|
| 31 |
def create_captions_rich(images):
|
| 32 |
"""
|
| 33 |
Generates captions for input images.
|
|
|
|
| 34 |
Args:
|
| 35 |
images (list): List of images to generate captions for.
|
|
|
|
| 36 |
Returns:
|
| 37 |
list: List of captions, one for each input image.
|
| 38 |
"""
|
|
|
|
| 67 |
with gr.Tab(label="Image to Prompt for SD3"):
|
| 68 |
with gr.Row():
|
| 69 |
with gr.Column():
|
| 70 |
+
input_img = gr.Gallery(label="Input Images", type="pil", interactive=True)
|
| 71 |
submit_btn = gr.Button(value="Start")
|
| 72 |
output = gr.Textbox(label="Prompt", lines=10, interactive=True)
|
| 73 |
|
| 74 |
submit_btn.click(create_captions_rich, [input_img], [output])
|
| 75 |
|
| 76 |
+
demo.launch(debug=True)
|