Toggle navigation
Toggle navigation
This project
Loading...
Sign in
万朱浩
/
Venue-Ops
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
戒酒的李白
2025-08-24 14:56:53 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5b3f5a7b87011892afc3bf20c32b20020f193538
5b3f5a7b
1 parent
611f0691
Web interface optimization.
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
25 deletions
SingleEngineApp/insight_engine_streamlit_app.py
SingleEngineApp/media_engine_streamlit_app.py
SingleEngineApp/query_engine_streamlit_app.py
templates/index.html
SingleEngineApp/insight_engine_streamlit_app.py
View file @
5b3f5a7
...
...
@@ -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
(
"等待搜索启动信号..."
)
# 验证配置
...
...
SingleEngineApp/media_engine_streamlit_app.py
View file @
5b3f5a7
...
...
@@ -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
(
"等待搜索启动信号..."
)
# 验证配置
...
...
SingleEngineApp/query_engine_streamlit_app.py
View file @
5b3f5a7
...
...
@@ -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
(
"等待搜索启动信号..."
)
# 验证配置
...
...
templates/index.html
View file @
5b3f5a7
...
...
@@ -3,7 +3,7 @@
<head>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<title>
微博舆情预测系统
</title>
<title>
致力于打造简洁通用的舆情分析平台
</title>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.0.0/socket.io.js"
></script>
<style>
*
{
...
...
@@ -261,10 +261,10 @@
<div
class=
"container"
>
<!-- 搜索框区域 -->
<div
class=
"search-section"
>
<div
class=
"search-title"
>
搜索框
</div>
<div
class=
"search-title"
>
致力于打造简洁通用的舆情分析平台
</div>
<div
class=
"search-box"
>
<input
type=
"text"
class=
"search-input"
id=
"searchInput"
placeholder=
"请输入搜索内容..."
>
<button
class=
"search-button"
id=
"searchButton"
>
搜索
</button>
<input
type=
"text"
class=
"search-input"
id=
"searchInput"
placeholder=
"请输入要分析的内容..."
>
<button
class=
"search-button"
id=
"searchButton"
>
开始
</button>
</div>
</div>
...
...
@@ -275,7 +275,7 @@
<div
class=
"embedded-header"
id=
"embeddedHeader"
>
嵌入的页面
</div>
<div
class=
"embedded-content"
id=
"embeddedContent"
>
<div
style=
"display: flex; align-items: center; justify-content: center; height: 100%; color: #666;"
>
<span>
只显示
一个页面 - 点击按钮切换页面
</span>
<span>
默认只显示第
一个页面 - 点击按钮切换页面
</span>
</div>
</div>
</div>
...
...
@@ -526,9 +526,9 @@
const
content
=
document
.
getElementById
(
'embeddedContent'
);
const
appNames
=
{
insight
:
'Insight Engine - 私有数据库分析'
,
media
:
'Media Engine - 多模态能力'
,
query
:
'Query Engine - 网页搜索'
insight
:
'Insight Agent - 私有数据库分析'
,
media
:
'Media Agent - 多模态能力'
,
query
:
'Query Agent - 网页搜索'
};
header
.
textContent
=
appNames
[
app
]
||
app
;
...
...
Please
register
or
login
to post a comment