From a82c3c4584dd3491b3c9450611c6b43ae2539457 Mon Sep 17 00:00:00 2001
From: ZHENRZHANG <1289182905@qq.com>
Date: Wed, 22 Oct 2025 10:52:31 +0800
Subject: [PATCH] Fix: Update environment name and resolve GUI issues
- Changed environment name from 'lmflow' to 'csllm' to match project branding
- Removed hardcoded prefix path in environment.yml
- Fixed syntax error: removed extra closing parenthesis in gui.py
- Removed reference to non-existent 'combination_method' variable
- Added cross-platform support for VESTA executable path
- Added icon.png file existence check to prevent runtime errors
- Added optional --vesta_path command-line argument
These changes improve code quality, fix runtime errors, and enhance cross-platform compatibility.
---
environment.yml | 7 +++----
gui.py | 31 +++++++++++++++++++++++++++----
2 files changed, 30 insertions(+), 8 deletions(-)
diff --git a/environment.yml b/environment.yml
index ad5dbda..4e62d6e 100644
--- a/environment.yml
+++ b/environment.yml
@@ -1,4 +1,4 @@
-name: lmflow
+name: csllm
channels:
- bioconda
- ursky
@@ -211,6 +211,5 @@ dependencies:
- wheel==0.43.0
- xxhash==3.2.0
- yarl==1.8.2
- - zipp==3.15.0
- - zstandard==0.22.0
-prefix: /data1/home/hhu01/anaconda3/envs/lmflow
+ - zipp==3.15.0
+ - zstandard==0.22.0
diff --git a/gui.py b/gui.py
index 1baa2e7..6666712 100644
--- a/gui.py
+++ b/gui.py
@@ -28,8 +28,13 @@ def img_to_base64(img_path):
return base64.b64encode(img_file.read()).decode('utf-8')
# 将图像路径转换为 base64 编码
-img_base64 = img_to_base64("icon.png")
-img_html = f''
+icon_path = "icon.png"
+if os.path.exists(icon_path):
+ img_base64 = img_to_base64(icon_path)
+ img_html = f'
'
+else:
+ # 如果图标不存在,使用空的HTML
+ img_html = '