Spaces:
Paused
Paused
support multi output
Browse files
app.py
CHANGED
|
@@ -197,7 +197,7 @@ def generate(*data):
|
|
| 197 |
description = "\n---\n".join([msg.content for msg in response])
|
| 198 |
md_content = description
|
| 199 |
|
| 200 |
-
alt_texts_str = '\n
|
| 201 |
|
| 202 |
alt_text_dict = {k[0]: v for (k, v) in zip(image, alt_texts)} if len(alt_texts) > 0 else {}
|
| 203 |
result_json = {"outputs": [msg.content for msg in response], "alt_text": alt_text_dict}
|
|
|
|
| 197 |
description = "\n---\n".join([msg.content for msg in response])
|
| 198 |
md_content = description
|
| 199 |
|
| 200 |
+
alt_texts_str = '\n\n### Alt text\n\n' + '\n- ' + '\n- '.join(alt_texts) if len(alt_texts) > 0 else ""
|
| 201 |
|
| 202 |
alt_text_dict = {k[0]: v for (k, v) in zip(image, alt_texts)} if len(alt_texts) > 0 else {}
|
| 203 |
result_json = {"outputs": [msg.content for msg in response], "alt_text": alt_text_dict}
|