From ae318c781162c4020c20b8494909c55b5072abea Mon Sep 17 00:00:00 2001 From: glide-the <2533736852@qq.com> Date: Tue, 21 May 2024 14:24:21 +0800 Subject: [PATCH] get_img_base64 --- chatchat-server/chatchat/webui_pages/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chatchat-server/chatchat/webui_pages/utils.py b/chatchat-server/chatchat/webui_pages/utils.py index 98be87d5..11d9edc7 100644 --- a/chatchat-server/chatchat/webui_pages/utils.py +++ b/chatchat-server/chatchat/webui_pages/utils.py @@ -699,7 +699,7 @@ def get_img_base64(file_name: str) -> str: get_img_base64 used in streamlit. absolute local path not working on windows. ''' - image = f"{IMG_DIR}/img/{file_name}" + image = f"{IMG_DIR}/{file_name}" # 读取图片 with open(image, "rb") as f: buffer = BytesIO(f.read())