修改输出格式

This commit is contained in:
505030475 2023-05-13 14:20:34 +08:00
parent 986653b43e
commit d52c0c4783

View File

@ -58,7 +58,9 @@ def 图片生成(prompt, llm_kwargs, plugin_kwargs, chatbot, history, system_pro
resolution = plugin_kwargs.get("advanced_arg", '256x256') resolution = plugin_kwargs.get("advanced_arg", '256x256')
image_url, image_path = gen_image(llm_kwargs, prompt, resolution) image_url, image_path = gen_image(llm_kwargs, prompt, resolution)
chatbot.append([prompt, chatbot.append([prompt,
f'`{image_url}`\n\n'+ f'图像中转网址: <br/>`{image_url}`<br/>'+
f'<div align="center"><img src="file={image_path}"></div>' f'中转网址预览: <br/><div align="center"><img src="{image_url}"></div>'
f'本地文件地址: <br/>`{image_path}`<br/>'+
f'本地文件预览: <br/><div align="center"><img src="file={image_path}"></div>'
]) ])
yield from update_ui(chatbot=chatbot, history=history) # 刷新界面 # 界面更新 yield from update_ui(chatbot=chatbot, history=history) # 刷新界面 # 界面更新