From 5b3f5a7b87011892afc3bf20c32b20020f193538 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=92=E9=85=92=E7=9A=84=E6=9D=8E=E7=99=BD?= <670939375@qq.com> Date: Sun, 24 Aug 2025 14:56:53 +0800 Subject: [PATCH] Web interface optimization. --- SingleEngineApp/insight_engine_streamlit_app.py | 8 ++------ SingleEngineApp/media_engine_streamlit_app.py | 8 ++------ SingleEngineApp/query_engine_streamlit_app.py | 6 +----- templates/index.html | 16 ++++++++-------- 4 files changed, 13 insertions(+), 25 deletions(-) diff --git a/SingleEngineApp/insight_engine_streamlit_app.py b/SingleEngineApp/insight_engine_streamlit_app.py index b0b9cf9..b9e6f50 100644 --- a/SingleEngineApp/insight_engine_streamlit_app.py +++ b/SingleEngineApp/insight_engine_streamlit_app.py @@ -20,7 +20,7 @@ def main(): """主函数""" st.set_page_config( page_title="Insight Agent", - page_icon="🔍", + page_icon="", layout="wide" ) @@ -48,14 +48,13 @@ def main(): max_content_length = 500000 # Kimi支持长文本 # 简化的研究查询展示区域 - st.header("研究查询") # 如果有自动查询,使用它作为默认值,否则显示占位符 display_query = auto_query if auto_query else "等待从主页面接收搜索查询..." # 只读的查询展示区域 st.text_area( - "当前查询", + "", value=display_query, height=100, disabled=True, @@ -69,10 +68,7 @@ def main(): if auto_search and auto_query and 'auto_search_executed' not in st.session_state: st.session_state.auto_search_executed = True start_research = True - st.success(f"🚀 接收到搜索请求:{auto_query}") - st.info("正在启动研究...") elif auto_query and not auto_search: - st.info(f"📝 当前查询:{auto_query}") st.warning("等待搜索启动信号...") # 验证配置 diff --git a/SingleEngineApp/media_engine_streamlit_app.py b/SingleEngineApp/media_engine_streamlit_app.py index 5a3f1fc..d2da9d3 100644 --- a/SingleEngineApp/media_engine_streamlit_app.py +++ b/SingleEngineApp/media_engine_streamlit_app.py @@ -20,7 +20,7 @@ def main(): """主函数""" st.set_page_config( page_title="Media Agent", - page_icon="🔍", + page_icon="", layout="wide" ) @@ -48,14 +48,13 @@ def main(): max_content_length = 20000 # 简化的研究查询展示区域 - st.header("研究查询") # 如果有自动查询,使用它作为默认值,否则显示占位符 display_query = auto_query if auto_query else "等待从主页面接收搜索查询..." # 只读的查询展示区域 st.text_area( - "当前查询", + "", value=display_query, height=100, disabled=True, @@ -69,10 +68,7 @@ def main(): if auto_search and auto_query and 'auto_search_executed' not in st.session_state: st.session_state.auto_search_executed = True start_research = True - st.success(f"🚀 接收到搜索请求:{auto_query}") - st.info("正在启动研究...") elif auto_query and not auto_search: - st.info(f"📝 当前查询:{auto_query}") st.warning("等待搜索启动信号...") # 验证配置 diff --git a/SingleEngineApp/query_engine_streamlit_app.py b/SingleEngineApp/query_engine_streamlit_app.py index 1593571..dfd607b 100644 --- a/SingleEngineApp/query_engine_streamlit_app.py +++ b/SingleEngineApp/query_engine_streamlit_app.py @@ -48,14 +48,13 @@ def main(): max_content_length = 20000 # 简化的研究查询展示区域 - st.header("研究查询") # 如果有自动查询,使用它作为默认值,否则显示占位符 display_query = auto_query if auto_query else "等待从主页面接收搜索查询..." # 只读的查询展示区域 st.text_area( - "当前查询", + "", value=display_query, height=100, disabled=True, @@ -69,10 +68,7 @@ def main(): if auto_search and auto_query and 'auto_search_executed' not in st.session_state: st.session_state.auto_search_executed = True start_research = True - st.success(f"🚀 接收到搜索请求:{auto_query}") - st.info("正在启动研究...") elif auto_query and not auto_search: - st.info(f"📝 当前查询:{auto_query}") st.warning("等待搜索启动信号...") # 验证配置 diff --git a/templates/index.html b/templates/index.html index be9ded0..4f947c7 100644 --- a/templates/index.html +++ b/templates/index.html @@ -3,7 +3,7 @@ - 微博舆情预测系统 + 致力于打造简洁通用的舆情分析平台