Spaces:
Build error
Build error
Update app_dialogue.py
Browse files- app_dialogue.py +3 -1
app_dialogue.py
CHANGED
|
@@ -282,8 +282,10 @@ def user_prompt_list_to_markdown(user_prompt_list: List[Union[str, PIL.Image.Ima
|
|
| 282 |
# resulting_string += f"})" #f""
|
| 283 |
# print(f"inside first ELIF - when elem is string and is the temp image filepath. resulting_string is - {resulting_string}")
|
| 284 |
elif isinstance(elem, PIL.Image.Image) or "/tmp/gradio/" in elem: #and "/tmp/gradio/" in elem:
|
| 285 |
-
resulting_string += f"})"
|
| 286 |
print(f"inside the ELIF - when elem is an instance of PIL.Image.Image or has /temp/file/path. resulting_string after pil_to_markdown_im() operation is - {resulting_string}")
|
|
|
|
|
|
|
| 287 |
else:
|
| 288 |
raise ValueError(
|
| 289 |
"Unknown type for `user_prompt_list`. Expected an element of type `str` or `PIL.Image.Image` and got"
|
|
|
|
| 282 |
# resulting_string += f"})" #f""
|
| 283 |
# print(f"inside first ELIF - when elem is string and is the temp image filepath. resulting_string is - {resulting_string}")
|
| 284 |
elif isinstance(elem, PIL.Image.Image) or "/tmp/gradio/" in elem: #and "/tmp/gradio/" in elem:
|
| 285 |
+
resulting_string += pil_to_markdown_im(convert_to_rgb(elem)) #f"})" <---------------
|
| 286 |
print(f"inside the ELIF - when elem is an instance of PIL.Image.Image or has /temp/file/path. resulting_string after pil_to_markdown_im() operation is - {resulting_string}")
|
| 287 |
+
elif isinstance(elem, str) and "/tmp/gradio/" in elem:
|
| 288 |
+
resulting_string += f"})"
|
| 289 |
else:
|
| 290 |
raise ValueError(
|
| 291 |
"Unknown type for `user_prompt_list`. Expected an element of type `str` or `PIL.Image.Image` and got"
|