Spaces:
Sleeping
Sleeping
quyk67uet
commited on
Commit
·
1fe29a0
1
Parent(s):
0b64664
Update 35
Browse files- pages/multiagent_system.py +376 -143
pages/multiagent_system.py
CHANGED
@@ -29,71 +29,184 @@ def display_system_architecture():
|
|
29 |
Hiển thị kiến trúc hệ thống
|
30 |
"""
|
31 |
st.markdown("""
|
32 |
-
<div style='background: #667eea;
|
33 |
padding: 2rem;
|
34 |
-
border-radius:
|
35 |
margin-bottom: 2rem;
|
36 |
-
text-align: center;
|
37 |
-
|
38 |
-
<h1 style='margin-bottom: 1rem; font-size: 2.5rem;'>
|
39 |
🤖 An Adaptive Multi-Agent Tutoring System
|
40 |
</h1>
|
41 |
-
<p style='font-size: 1.2rem; margin-bottom: 0;
|
42 |
Hệ thống gia sư thông minh với kiến trúc đa tác nhân thích ứng
|
43 |
</p>
|
44 |
</div>
|
45 |
""", unsafe_allow_html=True)
|
46 |
|
|
|
47 |
st.markdown("### 📊 Kiến trúc Hệ thống")
|
48 |
|
49 |
-
# Container cho hình ảnh
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
st.image("images/system.jpg", use_container_width=True)
|
54 |
-
except:
|
55 |
-
st.info("📊 Hình ảnh kiến trúc hệ thống: images/system.jpg")
|
56 |
|
57 |
def display_agents():
|
58 |
"""
|
59 |
-
Hiển thị chi tiết từng Agent với giao diện
|
60 |
"""
|
61 |
-
|
62 |
-
st.markdown("
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
|
64 |
-
# CSS
|
65 |
st.markdown("""
|
66 |
<style>
|
67 |
-
.agent-
|
68 |
background: white;
|
69 |
-
border-radius:
|
70 |
-
box-shadow: 0
|
71 |
-
margin-bottom:
|
72 |
-
|
|
|
73 |
}
|
|
|
74 |
.agent-header {
|
75 |
-
padding:
|
76 |
color: white;
|
77 |
-
border-radius: 10px 10px 0 0;
|
78 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
.agent-body {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
padding: 1.5rem;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
.feature-item {
|
83 |
-
padding: 0.
|
84 |
-
border-bottom: 1px solid
|
|
|
|
|
85 |
}
|
|
|
86 |
.feature-item:last-child {
|
87 |
border-bottom: none;
|
88 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
</style>
|
90 |
""", unsafe_allow_html=True)
|
91 |
|
92 |
-
# Định nghĩa thông tin các agents
|
93 |
agents = [
|
94 |
{
|
95 |
-
"
|
|
|
96 |
"icon": "🧠",
|
|
|
97 |
"color": "#667eea",
|
98 |
"role": "Chuyên gia giải toán với khả năng truy xuất thông tin thông minh",
|
99 |
"image": "images/informer_agent.png",
|
@@ -105,8 +218,10 @@ def display_agents():
|
|
105 |
]
|
106 |
},
|
107 |
{
|
108 |
-
"
|
|
|
109 |
"icon": "📝",
|
|
|
110 |
"color": "#f093fb",
|
111 |
"role": "Chuyên gia tạo bài tập và đề xuất tài liệu học tập",
|
112 |
"image": "images/practice_agent.png",
|
@@ -118,8 +233,10 @@ def display_agents():
|
|
118 |
]
|
119 |
},
|
120 |
{
|
121 |
-
"
|
|
|
122 |
"icon": "🔍",
|
|
|
123 |
"color": "#4facfe",
|
124 |
"role": "Chuyên gia phân tích tâm lý và học tập của học sinh",
|
125 |
"image": "images/insight_agent.png",
|
@@ -131,8 +248,10 @@ def display_agents():
|
|
131 |
]
|
132 |
},
|
133 |
{
|
134 |
-
"
|
|
|
135 |
"icon": "✅",
|
|
|
136 |
"color": "#a8edea",
|
137 |
"role": "Chuyên gia kiểm tra chất lượng và tính chính xác",
|
138 |
"image": "images/verifier_agent.png",
|
@@ -144,8 +263,10 @@ def display_agents():
|
|
144 |
]
|
145 |
},
|
146 |
{
|
147 |
-
"
|
|
|
148 |
"icon": "🎯",
|
|
|
149 |
"color": "#fcb69f",
|
150 |
"role": "Trung tâm điều phối và quản lý toàn bộ hệ thống",
|
151 |
"image": "images/tutor_agent.png",
|
@@ -160,17 +281,18 @@ def display_agents():
|
|
160 |
]
|
161 |
|
162 |
# Hiển thị từng agent
|
163 |
-
for agent in agents:
|
|
|
164 |
st.markdown(f"""
|
165 |
-
<div class="agent-
|
166 |
-
<div class="agent-header" style="background: {agent['
|
167 |
-
<
|
168 |
-
<span
|
169 |
-
{agent['name']}
|
170 |
-
</
|
171 |
-
<
|
172 |
<strong>Vai trò:</strong> {agent['role']}
|
173 |
-
</
|
174 |
</div>
|
175 |
""", unsafe_allow_html=True)
|
176 |
|
@@ -180,36 +302,60 @@ def display_agents():
|
|
180 |
with col1:
|
181 |
st.markdown(f"""
|
182 |
<div class="agent-body">
|
183 |
-
<
|
|
|
|
|
|
|
|
|
|
|
184 |
""", unsafe_allow_html=True)
|
185 |
|
186 |
for feature in agent['features']:
|
187 |
parts = feature.split(': ', 1)
|
188 |
if len(parts) == 2:
|
189 |
st.markdown(f"""
|
190 |
-
<
|
191 |
-
<
|
192 |
-
|
|
|
|
|
|
|
|
|
193 |
""", unsafe_allow_html=True)
|
194 |
else:
|
195 |
st.markdown(f"""
|
196 |
-
<
|
|
|
|
|
|
|
197 |
""", unsafe_allow_html=True)
|
198 |
|
199 |
-
st.markdown("
|
|
|
|
|
|
|
|
|
200 |
|
201 |
with col2:
|
202 |
try:
|
203 |
-
st.image(agent['image'], use_container_width=True, caption=agent['name'])
|
204 |
except:
|
205 |
st.markdown(f"""
|
206 |
-
<div
|
207 |
-
<div
|
208 |
-
|
|
|
|
|
|
|
209 |
</div>
|
210 |
""", unsafe_allow_html=True)
|
211 |
|
|
|
212 |
st.markdown("</div>", unsafe_allow_html=True)
|
|
|
|
|
|
|
|
|
213 |
|
214 |
def display_system_components():
|
215 |
"""
|
@@ -218,33 +364,36 @@ def display_system_components():
|
|
218 |
st.markdown("## 🏗️ Các Thành phần Hệ thống")
|
219 |
|
220 |
# Orchestration Hub
|
221 |
-
st.
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
|
|
|
|
233 |
|
234 |
# Hai flows chính
|
235 |
col1, col2 = st.columns(2)
|
236 |
|
237 |
with col1:
|
238 |
st.markdown("""
|
239 |
-
<div style='background: #ff9a9e;
|
240 |
padding: 1.5rem;
|
241 |
-
border-radius:
|
242 |
-
margin-bottom: 1rem;
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
<
|
|
|
248 |
<li>Xử lý truy vấn RAG</li>
|
249 |
<li>Giải quyết yêu cầu</li>
|
250 |
<li>Xác thực và soạn thảo</li>
|
@@ -256,15 +405,16 @@ def display_system_components():
|
|
256 |
|
257 |
with col2:
|
258 |
st.markdown("""
|
259 |
-
<div style='background: #a8edea;
|
260 |
padding: 1.5rem;
|
261 |
-
border-radius:
|
262 |
-
margin-bottom: 1rem;
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
<
|
|
|
268 |
<li>Phân tích thông tin người dùng</li>
|
269 |
<li>Gửi chủ đề phù hợp</li>
|
270 |
<li>Truy vấn dữ liệu</li>
|
@@ -276,38 +426,43 @@ def display_system_components():
|
|
276 |
|
277 |
def display_workflow_details():
|
278 |
"""
|
279 |
-
Hiển thị chi tiết quy trình làm việc
|
280 |
"""
|
281 |
st.markdown("## 🔄 Quy trình Hoạt động")
|
282 |
|
283 |
# Workflow steps
|
284 |
workflow_steps = [
|
285 |
{
|
286 |
-
"
|
|
|
287 |
"description": "Hệ thống nhận và phân tích câu hỏi từ người dùng",
|
288 |
"icon": "❓",
|
289 |
"color": "#FF6B6B"
|
290 |
},
|
291 |
{
|
292 |
-
"
|
|
|
293 |
"description": "Trung tâm điều phối quyết định luồng xử lý phù hợp",
|
294 |
"icon": "🎯",
|
295 |
"color": "#4ECDC4"
|
296 |
},
|
297 |
{
|
298 |
-
"
|
|
|
299 |
"description": "Flow A giải quyết vấn đề, Flow B cá nhân hóa trải nghiệm",
|
300 |
"icon": "⚡",
|
301 |
"color": "#45B7D1"
|
302 |
},
|
303 |
{
|
304 |
-
"
|
|
|
305 |
"description": "Hệ thống cập nhật thông tin học tập và điểm yếu",
|
306 |
"icon": "📊",
|
307 |
"color": "#96CEB4"
|
308 |
},
|
309 |
{
|
310 |
-
"
|
|
|
311 |
"description": "Cung cấp câu trả lời được xác thực và cá nhân hóa",
|
312 |
"icon": "✅",
|
313 |
"color": "#FECA57"
|
@@ -315,33 +470,36 @@ def display_workflow_details():
|
|
315 |
]
|
316 |
|
317 |
for i, step in enumerate(workflow_steps):
|
|
|
318 |
col1, col2 = st.columns([1, 4])
|
319 |
|
320 |
with col1:
|
321 |
st.markdown(f"""
|
322 |
-
<div style='width:
|
323 |
-
height:
|
324 |
background: {step['color']};
|
325 |
border-radius: 50%;
|
326 |
display: flex;
|
327 |
align-items: center;
|
328 |
justify-content: center;
|
329 |
-
margin: 0 auto;
|
330 |
-
|
331 |
-
font-size: 1.5rem;'>
|
332 |
-
{step['icon']}
|
333 |
</div>
|
334 |
""", unsafe_allow_html=True)
|
335 |
|
336 |
with col2:
|
337 |
st.markdown(f"""
|
338 |
-
<div style='background:
|
339 |
padding: 1rem;
|
340 |
-
border-radius:
|
341 |
margin-bottom: 1rem;
|
342 |
border-left: 4px solid {step['color']};'>
|
343 |
-
<h4 style='color: #333; margin-bottom: 0.5rem;'>
|
344 |
-
|
|
|
|
|
|
|
|
|
345 |
</div>
|
346 |
""", unsafe_allow_html=True)
|
347 |
|
@@ -363,37 +521,77 @@ def display_technical_features():
|
|
363 |
|
364 |
with col1:
|
365 |
st.markdown("""
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
371 |
|
372 |
-
|
373 |
-
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
378 |
|
379 |
with col2:
|
380 |
st.markdown("""
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
386 |
|
387 |
-
|
388 |
-
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
393 |
|
394 |
def display_benefits():
|
395 |
"""
|
396 |
-
Hiển thị lợi ích của hệ thống
|
397 |
"""
|
398 |
st.markdown("## 🌟 Lợi ích của Hệ thống")
|
399 |
|
@@ -401,48 +599,84 @@ def display_benefits():
|
|
401 |
{
|
402 |
"icon": "🎯",
|
403 |
"title": "Học tập cá nhân hóa",
|
404 |
-
"description": "Mỗi học sinh nhận được trải nghiệm học tập được tùy chỉnh theo nhu cầu riêng"
|
|
|
405 |
},
|
406 |
{
|
407 |
"icon": "⚡",
|
408 |
"title": "Phản hồi tức thì",
|
409 |
-
"description": "Hệ thống đa tác nhân cho phép xử lý song song, đưa ra phản hồi nhanh chóng"
|
|
|
410 |
},
|
411 |
{
|
412 |
"icon": "🧠",
|
413 |
"title": "Học thích ứng thông minh",
|
414 |
-
"description": "AI phân tích và điều chỉnh phương pháp dạy theo tiến bộ của từng học sinh"
|
|
|
415 |
},
|
416 |
{
|
417 |
"icon": "📊",
|
418 |
"title": "Theo dõi tiến độ chi tiết",
|
419 |
-
"description": "Báo cáo và phân tích tiến độ học tập giúp tối ưu hóa quá trình học"
|
|
|
420 |
},
|
421 |
{
|
422 |
"icon": "🔍",
|
423 |
"title": "Độ chính xác cao",
|
424 |
-
"description": "Hệ thống RAG và xác thực đảm bảo thông tin chính xác và đáng tin cậy"
|
|
|
425 |
},
|
426 |
{
|
427 |
"icon": "🌐",
|
428 |
"title": "Mở rộng dễ dàng",
|
429 |
-
"description": "Kiến trúc đa tác nhân cho phép mở rộng và thêm tính năng mới linh hoạt"
|
|
|
430 |
}
|
431 |
]
|
432 |
|
433 |
-
# Hiển thị benefits trong lưới
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
446 |
|
447 |
def main():
|
448 |
"""
|
@@ -466,19 +700,18 @@ def main():
|
|
466 |
# Hiển thị lợi ích
|
467 |
display_benefits()
|
468 |
|
469 |
-
# Footer
|
470 |
st.markdown("---")
|
471 |
st.markdown("""
|
472 |
<div style='text-align: center;
|
473 |
-
background: #667eea;
|
474 |
padding: 2rem;
|
475 |
-
border-radius:
|
476 |
-
margin-top: 2rem;
|
477 |
-
|
478 |
-
<h3 style='margin-bottom: 1rem;'>
|
479 |
🚀 Trải nghiệm Hệ thống Multi-Agent ngay hôm nay!
|
480 |
</h3>
|
481 |
-
<p style='font-size: 1.1rem; margin: 0;
|
482 |
Hệ thống gia sư AI thông minh với kiến trúc đa tác nhân tiên tiến,
|
483 |
mang đến trải nghiệm học tập cá nhân hóa và hiệu quả nhất.
|
484 |
</p>
|
|
|
29 |
Hiển thị kiến trúc hệ thống
|
30 |
"""
|
31 |
st.markdown("""
|
32 |
+
<div style='background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
33 |
padding: 2rem;
|
34 |
+
border-radius: 15px;
|
35 |
margin-bottom: 2rem;
|
36 |
+
text-align: center;'>
|
37 |
+
<h1 style='color: white; margin-bottom: 1rem; font-size: 2.5rem;'>
|
|
|
38 |
🤖 An Adaptive Multi-Agent Tutoring System
|
39 |
</h1>
|
40 |
+
<p style='color: #f0f0f0; font-size: 1.2rem; margin-bottom: 0;'>
|
41 |
Hệ thống gia sư thông minh với kiến trúc đa tác nhân thích ứng
|
42 |
</p>
|
43 |
</div>
|
44 |
""", unsafe_allow_html=True)
|
45 |
|
46 |
+
# Placeholder cho hình ảnh system architecture
|
47 |
st.markdown("### 📊 Kiến trúc Hệ thống")
|
48 |
|
49 |
+
# Container cho hình ảnh với styling đẹp
|
50 |
+
with st.container():
|
51 |
+
col1, col2, col3 = st.columns([1, 3, 1])
|
52 |
+
with col2:
|
53 |
st.image("images/system.jpg", use_container_width=True)
|
|
|
|
|
54 |
|
55 |
def display_agents():
|
56 |
"""
|
57 |
+
Hiển thị chi tiết từng Agent với giao diện được tối ưu hóa
|
58 |
"""
|
59 |
+
# Header section
|
60 |
+
st.markdown("""
|
61 |
+
<div style="margin: 3rem 0 2rem 0;">
|
62 |
+
<h2 style="text-align: center; color: #333; margin-bottom: 0.5rem; font-size: 2.5rem;">
|
63 |
+
🤖 Chi tiết các AI Agents
|
64 |
+
</h2>
|
65 |
+
<p style="text-align: center; color: #666; font-size: 1.1rem; margin-bottom: 2rem;">
|
66 |
+
Khám phá hệ sinh thái AI agents thông minh và chuyên biệt
|
67 |
+
</p>
|
68 |
+
</div>
|
69 |
+
""", unsafe_allow_html=True)
|
70 |
|
71 |
+
# CSS được tối ưu hóa - loại bỏ các effect phức tạp
|
72 |
st.markdown("""
|
73 |
<style>
|
74 |
+
.agent-container {
|
75 |
background: white;
|
76 |
+
border-radius: 15px;
|
77 |
+
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
|
78 |
+
margin-bottom: 2rem;
|
79 |
+
overflow: hidden;
|
80 |
+
border: 1px solid rgba(0,0,0,0.05);
|
81 |
}
|
82 |
+
|
83 |
.agent-header {
|
84 |
+
padding: 2rem;
|
85 |
color: white;
|
|
|
86 |
}
|
87 |
+
|
88 |
+
.agent-title {
|
89 |
+
display: flex;
|
90 |
+
align-items: center;
|
91 |
+
margin-bottom: 1rem;
|
92 |
+
font-size: 1.8rem;
|
93 |
+
font-weight: 600;
|
94 |
+
}
|
95 |
+
|
96 |
+
.agent-title-icon {
|
97 |
+
font-size: 2.5rem;
|
98 |
+
margin-right: 1rem;
|
99 |
+
}
|
100 |
+
|
101 |
+
.agent-role {
|
102 |
+
background: rgba(255,255,255,0.2);
|
103 |
+
padding: 1rem;
|
104 |
+
border-radius: 10px;
|
105 |
+
font-size: 1.1rem;
|
106 |
+
border: 1px solid rgba(255,255,255,0.2);
|
107 |
+
}
|
108 |
+
|
109 |
.agent-body {
|
110 |
+
padding: 2rem;
|
111 |
+
background: #fafafa;
|
112 |
+
}
|
113 |
+
|
114 |
+
.agent-features {
|
115 |
+
background: white;
|
116 |
+
border-radius: 12px;
|
117 |
padding: 1.5rem;
|
118 |
+
box-shadow: 0 2px 8px rgba(0,0,0,0.05);
|
119 |
+
border: 1px solid rgba(0,0,0,0.05);
|
120 |
+
}
|
121 |
+
|
122 |
+
.features-title {
|
123 |
+
display: flex;
|
124 |
+
align-items: center;
|
125 |
+
margin-bottom: 1.5rem;
|
126 |
+
font-size: 1.3rem;
|
127 |
+
font-weight: 600;
|
128 |
+
color: #333;
|
129 |
}
|
130 |
+
|
131 |
+
.features-list {
|
132 |
+
list-style: none;
|
133 |
+
padding: 0;
|
134 |
+
margin: 0;
|
135 |
+
}
|
136 |
+
|
137 |
.feature-item {
|
138 |
+
padding: 0.8rem 0;
|
139 |
+
border-bottom: 1px solid rgba(0,0,0,0.05);
|
140 |
+
display: flex;
|
141 |
+
align-items: flex-start;
|
142 |
}
|
143 |
+
|
144 |
.feature-item:last-child {
|
145 |
border-bottom: none;
|
146 |
}
|
147 |
+
|
148 |
+
.feature-bullet {
|
149 |
+
width: 8px;
|
150 |
+
height: 8px;
|
151 |
+
border-radius: 50%;
|
152 |
+
margin-right: 1rem;
|
153 |
+
margin-top: 0.5rem;
|
154 |
+
flex-shrink: 0;
|
155 |
+
}
|
156 |
+
|
157 |
+
.feature-text {
|
158 |
+
flex: 1;
|
159 |
+
line-height: 1.6;
|
160 |
+
}
|
161 |
+
|
162 |
+
.feature-name {
|
163 |
+
font-weight: 600;
|
164 |
+
margin-right: 0.5rem;
|
165 |
+
}
|
166 |
+
|
167 |
+
.image-placeholder {
|
168 |
+
background: rgba(255,255,255,0.9);
|
169 |
+
border: 2px dashed #ddd;
|
170 |
+
border-radius: 12px;
|
171 |
+
padding: 2rem;
|
172 |
+
text-align: center;
|
173 |
+
height: 250px;
|
174 |
+
display: flex;
|
175 |
+
flex-direction: column;
|
176 |
+
justify-content: center;
|
177 |
+
align-items: center;
|
178 |
+
}
|
179 |
+
|
180 |
+
.placeholder-icon {
|
181 |
+
font-size: 3rem;
|
182 |
+
margin-bottom: 1rem;
|
183 |
+
opacity: 0.7;
|
184 |
+
}
|
185 |
+
|
186 |
+
.placeholder-text {
|
187 |
+
font-weight: 600;
|
188 |
+
margin-bottom: 0.5rem;
|
189 |
+
color: #333;
|
190 |
+
}
|
191 |
+
|
192 |
+
.placeholder-path {
|
193 |
+
font-size: 0.9rem;
|
194 |
+
color: #666;
|
195 |
+
font-family: monospace;
|
196 |
+
background: rgba(0,0,0,0.05);
|
197 |
+
padding: 0.3rem 0.8rem;
|
198 |
+
border-radius: 15px;
|
199 |
+
}
|
200 |
</style>
|
201 |
""", unsafe_allow_html=True)
|
202 |
|
203 |
+
# Định nghĩa thông tin các agents
|
204 |
agents = [
|
205 |
{
|
206 |
+
"number": "1",
|
207 |
+
"name": "Informer Agent",
|
208 |
"icon": "🧠",
|
209 |
+
"gradient": "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
|
210 |
"color": "#667eea",
|
211 |
"role": "Chuyên gia giải toán với khả năng truy xuất thông tin thông minh",
|
212 |
"image": "images/informer_agent.png",
|
|
|
218 |
]
|
219 |
},
|
220 |
{
|
221 |
+
"number": "2",
|
222 |
+
"name": "Practice Agent",
|
223 |
"icon": "📝",
|
224 |
+
"gradient": "linear-gradient(135deg, #f093fb 0%, #f5576c 100%)",
|
225 |
"color": "#f093fb",
|
226 |
"role": "Chuyên gia tạo bài tập và đề xuất tài liệu học tập",
|
227 |
"image": "images/practice_agent.png",
|
|
|
233 |
]
|
234 |
},
|
235 |
{
|
236 |
+
"number": "3",
|
237 |
+
"name": "Insight Agent",
|
238 |
"icon": "🔍",
|
239 |
+
"gradient": "linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)",
|
240 |
"color": "#4facfe",
|
241 |
"role": "Chuyên gia phân tích tâm lý và học tập của học sinh",
|
242 |
"image": "images/insight_agent.png",
|
|
|
248 |
]
|
249 |
},
|
250 |
{
|
251 |
+
"number": "4",
|
252 |
+
"name": "Verifier Agent",
|
253 |
"icon": "✅",
|
254 |
+
"gradient": "linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)",
|
255 |
"color": "#a8edea",
|
256 |
"role": "Chuyên gia kiểm tra chất lượng và tính chính xác",
|
257 |
"image": "images/verifier_agent.png",
|
|
|
263 |
]
|
264 |
},
|
265 |
{
|
266 |
+
"number": "5",
|
267 |
+
"name": "Tutor Agent (Orchestrator)",
|
268 |
"icon": "🎯",
|
269 |
+
"gradient": "linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%)",
|
270 |
"color": "#fcb69f",
|
271 |
"role": "Trung tâm điều phối và quản lý toàn bộ hệ thống",
|
272 |
"image": "images/tutor_agent.png",
|
|
|
281 |
]
|
282 |
|
283 |
# Hiển thị từng agent
|
284 |
+
for i, agent in enumerate(agents):
|
285 |
+
# Container chính
|
286 |
st.markdown(f"""
|
287 |
+
<div class="agent-container">
|
288 |
+
<div class="agent-header" style="background: {agent['gradient']};">
|
289 |
+
<div class="agent-title">
|
290 |
+
<span class="agent-title-icon">{agent['icon']}</span>
|
291 |
+
<span>Agent {agent['number']}: {agent['name']}</span>
|
292 |
+
</div>
|
293 |
+
<div class="agent-role">
|
294 |
<strong>Vai trò:</strong> {agent['role']}
|
295 |
+
</div>
|
296 |
</div>
|
297 |
""", unsafe_allow_html=True)
|
298 |
|
|
|
302 |
with col1:
|
303 |
st.markdown(f"""
|
304 |
<div class="agent-body">
|
305 |
+
<div class="agent-features">
|
306 |
+
<div class="features-title">
|
307 |
+
<span style="margin-right: 0.5rem;">🔧</span>
|
308 |
+
<span>Chức năng chính</span>
|
309 |
+
</div>
|
310 |
+
<ul class="features-list">
|
311 |
""", unsafe_allow_html=True)
|
312 |
|
313 |
for feature in agent['features']:
|
314 |
parts = feature.split(': ', 1)
|
315 |
if len(parts) == 2:
|
316 |
st.markdown(f"""
|
317 |
+
<li class="feature-item">
|
318 |
+
<div class="feature-bullet" style="background: {agent['color']};"></div>
|
319 |
+
<div class="feature-text">
|
320 |
+
<span class="feature-name" style="color: {agent['color']};">{parts[0]}:</span>
|
321 |
+
<span>{parts[1]}</span>
|
322 |
+
</div>
|
323 |
+
</li>
|
324 |
""", unsafe_allow_html=True)
|
325 |
else:
|
326 |
st.markdown(f"""
|
327 |
+
<li class="feature-item">
|
328 |
+
<div class="feature-bullet" style="background: {agent['color']};"></div>
|
329 |
+
<div class="feature-text">{feature}</div>
|
330 |
+
</li>
|
331 |
""", unsafe_allow_html=True)
|
332 |
|
333 |
+
st.markdown("""
|
334 |
+
</ul>
|
335 |
+
</div>
|
336 |
+
</div>
|
337 |
+
""", unsafe_allow_html=True)
|
338 |
|
339 |
with col2:
|
340 |
try:
|
341 |
+
st.image(agent['image'], use_container_width=True, caption=f"Agent {agent['number']}: {agent['name']}")
|
342 |
except:
|
343 |
st.markdown(f"""
|
344 |
+
<div class="agent-body">
|
345 |
+
<div class="image-placeholder">
|
346 |
+
<div class="placeholder-icon" style="color: {agent['color']};">{agent['icon']}</div>
|
347 |
+
<div class="placeholder-text">Agent {agent['number']} Image</div>
|
348 |
+
<div class="placeholder-path">{agent['image']}</div>
|
349 |
+
</div>
|
350 |
</div>
|
351 |
""", unsafe_allow_html=True)
|
352 |
|
353 |
+
# Đóng container
|
354 |
st.markdown("</div>", unsafe_allow_html=True)
|
355 |
+
|
356 |
+
# Spacing giữa các agents
|
357 |
+
if i < len(agents) - 1:
|
358 |
+
st.markdown("<div style='margin: 2rem 0;'></div>", unsafe_allow_html=True)
|
359 |
|
360 |
def display_system_components():
|
361 |
"""
|
|
|
364 |
st.markdown("## 🏗️ Các Thành phần Hệ thống")
|
365 |
|
366 |
# Orchestration Hub
|
367 |
+
with st.container():
|
368 |
+
st.markdown("""
|
369 |
+
<div style='background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
|
370 |
+
padding: 1.5rem;
|
371 |
+
border-radius: 10px;
|
372 |
+
margin-bottom: 1rem;'>
|
373 |
+
<h3 style='color: white; margin-bottom: 0.5rem;'>
|
374 |
+
🎯 Orchestration Hub
|
375 |
+
</h3>
|
376 |
+
<p style='color: #f0f0f0; margin-bottom: 0;'>
|
377 |
+
Trung tâm điều phối và quản lý tất cả các tác nhân trong hệ thống
|
378 |
+
</p>
|
379 |
+
</div>
|
380 |
+
""", unsafe_allow_html=True)
|
381 |
|
382 |
# Hai flows chính
|
383 |
col1, col2 = st.columns(2)
|
384 |
|
385 |
with col1:
|
386 |
st.markdown("""
|
387 |
+
<div style='background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
|
388 |
padding: 1.5rem;
|
389 |
+
border-radius: 10px;
|
390 |
+
margin-bottom: 1rem;'>
|
391 |
+
<h3 style='color: #8B0000; margin-bottom: 1rem;'>
|
392 |
+
📝 Flow A: Problem-Solving
|
393 |
+
</h3>
|
394 |
+
<div style='background: rgba(255,255,255,0.2); padding: 1rem; border-radius: 8px;'>
|
395 |
+
<h4 style='color: #8B0000; margin-bottom: 0.5rem;'>RAG & Verification</h4>
|
396 |
+
<ul style='color: #2F4F4F; margin-bottom: 0;'>
|
397 |
<li>Xử lý truy vấn RAG</li>
|
398 |
<li>Giải quyết yêu cầu</li>
|
399 |
<li>Xác thực và soạn thảo</li>
|
|
|
405 |
|
406 |
with col2:
|
407 |
st.markdown("""
|
408 |
+
<div style='background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
|
409 |
padding: 1.5rem;
|
410 |
+
border-radius: 10px;
|
411 |
+
margin-bottom: 1rem;'>
|
412 |
+
<h3 style='color: #2F4F4F; margin-bottom: 1rem;'>
|
413 |
+
🎯 Flow B: Personalization
|
414 |
+
</h3>
|
415 |
+
<div style='background: rgba(255,255,255,0.2); padding: 1rem; border-radius: 8px;'>
|
416 |
+
<h4 style='color: #2F4F4F; margin-bottom: 0.5rem;'>Learning Engine</h4>
|
417 |
+
<ul style='color: #2F4F4F; margin-bottom: 0;'>
|
418 |
<li>Phân tích thông tin người dùng</li>
|
419 |
<li>Gửi chủ đề phù hợp</li>
|
420 |
<li>Truy vấn dữ liệu</li>
|
|
|
426 |
|
427 |
def display_workflow_details():
|
428 |
"""
|
429 |
+
Hiển thị chi tiết quy trình làm việc - được tối ưu hóa
|
430 |
"""
|
431 |
st.markdown("## 🔄 Quy trình Hoạt động")
|
432 |
|
433 |
# Workflow steps
|
434 |
workflow_steps = [
|
435 |
{
|
436 |
+
"step": "1",
|
437 |
+
"title": "Nhận câu hỏi từ học sinh",
|
438 |
"description": "Hệ thống nhận và phân tích câu hỏi từ người dùng",
|
439 |
"icon": "❓",
|
440 |
"color": "#FF6B6B"
|
441 |
},
|
442 |
{
|
443 |
+
"step": "2",
|
444 |
+
"title": "Orchestration Hub phân tích",
|
445 |
"description": "Trung tâm điều phối quyết định luồng xử lý phù hợp",
|
446 |
"icon": "🎯",
|
447 |
"color": "#4ECDC4"
|
448 |
},
|
449 |
{
|
450 |
+
"step": "3",
|
451 |
+
"title": "Xử lý song song",
|
452 |
"description": "Flow A giải quyết vấn đề, Flow B cá nhân hóa trải nghiệm",
|
453 |
"icon": "⚡",
|
454 |
"color": "#45B7D1"
|
455 |
},
|
456 |
{
|
457 |
+
"step": "4",
|
458 |
+
"title": "Cập nhật hồ sơ học sinh",
|
459 |
"description": "Hệ thống cập nhật thông tin học tập và điểm yếu",
|
460 |
"icon": "📊",
|
461 |
"color": "#96CEB4"
|
462 |
},
|
463 |
{
|
464 |
+
"step": "5",
|
465 |
+
"title": "Trả lời cuối cùng",
|
466 |
"description": "Cung cấp câu trả lời được xác thực và cá nhân hóa",
|
467 |
"icon": "✅",
|
468 |
"color": "#FECA57"
|
|
|
470 |
]
|
471 |
|
472 |
for i, step in enumerate(workflow_steps):
|
473 |
+
# Tạo layout cho từng bước
|
474 |
col1, col2 = st.columns([1, 4])
|
475 |
|
476 |
with col1:
|
477 |
st.markdown(f"""
|
478 |
+
<div style='width: 70px;
|
479 |
+
height: 70px;
|
480 |
background: {step['color']};
|
481 |
border-radius: 50%;
|
482 |
display: flex;
|
483 |
align-items: center;
|
484 |
justify-content: center;
|
485 |
+
margin: 0 auto;'>
|
486 |
+
<span style='font-size: 1.8rem;'>{step['icon']}</span>
|
|
|
|
|
487 |
</div>
|
488 |
""", unsafe_allow_html=True)
|
489 |
|
490 |
with col2:
|
491 |
st.markdown(f"""
|
492 |
+
<div style='background: {step['color']}20;
|
493 |
padding: 1rem;
|
494 |
+
border-radius: 10px;
|
495 |
margin-bottom: 1rem;
|
496 |
border-left: 4px solid {step['color']};'>
|
497 |
+
<h4 style='color: #333; margin-bottom: 0.5rem;'>
|
498 |
+
Bước {step['step']}: {step['title']}
|
499 |
+
</h4>
|
500 |
+
<p style='color: #666; margin-bottom: 0;'>
|
501 |
+
{step['description']}
|
502 |
+
</p>
|
503 |
</div>
|
504 |
""", unsafe_allow_html=True)
|
505 |
|
|
|
521 |
|
522 |
with col1:
|
523 |
st.markdown("""
|
524 |
+
<div style='background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
525 |
+
padding: 1.5rem;
|
526 |
+
border-radius: 10px;
|
527 |
+
margin-bottom: 1rem;'>
|
528 |
+
<h4 style='color: white; margin-bottom: 1rem;'>
|
529 |
+
🔍 RAG (Retrieval-Augmented Generation)
|
530 |
+
</h4>
|
531 |
+
<ul style='color: #f0f0f0; margin-bottom: 0;'>
|
532 |
+
<li>Truy xuất thông tin từ cơ sở dữ liệu</li>
|
533 |
+
<li>Tăng cường khả năng sinh text</li>
|
534 |
+
<li>Đảm bảo tính chính xác cao</li>
|
535 |
+
<li>Xác thực câu trả lời</li>
|
536 |
+
</ul>
|
537 |
+
</div>
|
538 |
+
""", unsafe_allow_html=True)
|
539 |
|
540 |
+
st.markdown("""
|
541 |
+
<div style='background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
|
542 |
+
padding: 1.5rem;
|
543 |
+
border-radius: 10px;
|
544 |
+
margin-bottom: 1rem;'>
|
545 |
+
<h4 style='color: white; margin-bottom: 1rem;'>
|
546 |
+
🎯 Personalization Engine
|
547 |
+
</h4>
|
548 |
+
<ul style='color: #f0f0f0; margin-bottom: 0;'>
|
549 |
+
<li>Phân tích điểm yếu học sinh</li>
|
550 |
+
<li>Tạo bài tập cá nhân hóa</li>
|
551 |
+
<li>Theo dõi tiến độ học tập</li>
|
552 |
+
<li>Đề xuất nội dung phù hợp</li>
|
553 |
+
</ul>
|
554 |
+
</div>
|
555 |
+
""", unsafe_allow_html=True)
|
556 |
|
557 |
with col2:
|
558 |
st.markdown("""
|
559 |
+
<div style='background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
|
560 |
+
padding: 1.5rem;
|
561 |
+
border-radius: 10px;
|
562 |
+
margin-bottom: 1rem;'>
|
563 |
+
<h4 style='color: white; margin-bottom: 1rem;'>
|
564 |
+
🧠 Adaptive Learning
|
565 |
+
</h4>
|
566 |
+
<ul style='color: #f0f0f0; margin-bottom: 0;'>
|
567 |
+
<li>Học thích ứng theo năng lực</li>
|
568 |
+
<li>Điều chỉnh độ khó tự động</li>
|
569 |
+
<li>Phản hồi thời gian thực</li>
|
570 |
+
<li>Tối ưu hóa trải nghiệm</li>
|
571 |
+
</ul>
|
572 |
+
</div>
|
573 |
+
""", unsafe_allow_html=True)
|
574 |
|
575 |
+
st.markdown("""
|
576 |
+
<div style='background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
|
577 |
+
padding: 1.5rem;
|
578 |
+
border-radius: 10px;
|
579 |
+
margin-bottom: 1rem;'>
|
580 |
+
<h4 style='color: white; margin-bottom: 1rem;'>
|
581 |
+
📊 User Profile Management
|
582 |
+
</h4>
|
583 |
+
<ul style='color: #f0f0f0; margin-bottom: 0;'>
|
584 |
+
<li>Lưu trữ lịch sử học tập</li>
|
585 |
+
<li>Phân tích pattern học tập</li>
|
586 |
+
<li>Cập nhật thông tin real-time</li>
|
587 |
+
<li>Báo cáo tiến độ chi tiết</li>
|
588 |
+
</ul>
|
589 |
+
</div>
|
590 |
+
""", unsafe_allow_html=True)
|
591 |
|
592 |
def display_benefits():
|
593 |
"""
|
594 |
+
Hiển thị lợi ích của hệ thống - được tối ưu hóa
|
595 |
"""
|
596 |
st.markdown("## 🌟 Lợi ích của Hệ thống")
|
597 |
|
|
|
599 |
{
|
600 |
"icon": "🎯",
|
601 |
"title": "Học tập cá nhân hóa",
|
602 |
+
"description": "Mỗi học sinh nhận được trải nghiệm học tập được tùy chỉnh theo nhu cầu riêng",
|
603 |
+
"color": "#FF6B6B"
|
604 |
},
|
605 |
{
|
606 |
"icon": "⚡",
|
607 |
"title": "Phản hồi tức thì",
|
608 |
+
"description": "Hệ thống đa tác nhân cho phép xử lý song song, đưa ra phản hồi nhanh chóng",
|
609 |
+
"color": "#4ECDC4"
|
610 |
},
|
611 |
{
|
612 |
"icon": "🧠",
|
613 |
"title": "Học thích ứng thông minh",
|
614 |
+
"description": "AI phân tích và điều chỉnh phương pháp dạy theo tiến bộ của từng học sinh",
|
615 |
+
"color": "#45B7D1"
|
616 |
},
|
617 |
{
|
618 |
"icon": "📊",
|
619 |
"title": "Theo dõi tiến độ chi tiết",
|
620 |
+
"description": "Báo cáo và phân tích tiến độ học tập giúp tối ưu hóa quá trình học",
|
621 |
+
"color": "#96CEB4"
|
622 |
},
|
623 |
{
|
624 |
"icon": "🔍",
|
625 |
"title": "Độ chính xác cao",
|
626 |
+
"description": "Hệ thống RAG và xác thực đảm bảo thông tin chính xác và đáng tin cậy",
|
627 |
+
"color": "#FECA57"
|
628 |
},
|
629 |
{
|
630 |
"icon": "🌐",
|
631 |
"title": "Mở rộng dễ dàng",
|
632 |
+
"description": "Kiến trúc đa tác nhân cho phép mở rộng và thêm tính năng mới linh hoạt",
|
633 |
+
"color": "#FF9FF3"
|
634 |
}
|
635 |
]
|
636 |
|
637 |
+
# Hiển thị benefits trong lưới 2x3
|
638 |
+
for i in range(0, len(benefits), 2):
|
639 |
+
col1, col2 = st.columns(2)
|
640 |
+
|
641 |
+
with col1:
|
642 |
+
if i < len(benefits):
|
643 |
+
benefit = benefits[i]
|
644 |
+
st.markdown(f"""
|
645 |
+
<div style='background: {benefit['color']}20;
|
646 |
+
padding: 1.5rem;
|
647 |
+
border-radius: 10px;
|
648 |
+
margin-bottom: 1rem;
|
649 |
+
border-left: 4px solid {benefit['color']};
|
650 |
+
height: 130px;'>
|
651 |
+
<div style='display: flex; align-items: center; margin-bottom: 0.5rem;'>
|
652 |
+
<span style='font-size: 1.8rem; margin-right: 0.5rem;'>{benefit['icon']}</span>
|
653 |
+
<h4 style='color: #333; margin: 0;'>{benefit['title']}</h4>
|
654 |
+
</div>
|
655 |
+
<p style='color: #666; margin: 0; font-size: 0.9rem;'>
|
656 |
+
{benefit['description']}
|
657 |
+
</p>
|
658 |
+
</div>
|
659 |
+
""", unsafe_allow_html=True)
|
660 |
+
|
661 |
+
with col2:
|
662 |
+
if i + 1 < len(benefits):
|
663 |
+
benefit = benefits[i + 1]
|
664 |
+
st.markdown(f"""
|
665 |
+
<div style='background: {benefit['color']}20;
|
666 |
+
padding: 1.5rem;
|
667 |
+
border-radius: 10px;
|
668 |
+
margin-bottom: 1rem;
|
669 |
+
border-left: 4px solid {benefit['color']};
|
670 |
+
height: 130px;'>
|
671 |
+
<div style='display: flex; align-items: center; margin-bottom: 0.5rem;'>
|
672 |
+
<span style='font-size: 1.8rem; margin-right: 0.5rem;'>{benefit['icon']}</span>
|
673 |
+
<h4 style='color: #333; margin: 0;'>{benefit['title']}</h4>
|
674 |
+
</div>
|
675 |
+
<p style='color: #666; margin: 0; font-size: 0.9rem;'>
|
676 |
+
{benefit['description']}
|
677 |
+
</p>
|
678 |
+
</div>
|
679 |
+
""", unsafe_allow_html=True)
|
680 |
|
681 |
def main():
|
682 |
"""
|
|
|
700 |
# Hiển thị lợi ích
|
701 |
display_benefits()
|
702 |
|
703 |
+
# Footer
|
704 |
st.markdown("---")
|
705 |
st.markdown("""
|
706 |
<div style='text-align: center;
|
707 |
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
708 |
padding: 2rem;
|
709 |
+
border-radius: 15px;
|
710 |
+
margin-top: 2rem;'>
|
711 |
+
<h3 style='color: white; margin-bottom: 1rem;'>
|
|
|
712 |
🚀 Trải nghiệm Hệ thống Multi-Agent ngay hôm nay!
|
713 |
</h3>
|
714 |
+
<p style='color: #f0f0f0; font-size: 1.1rem; margin-bottom: 0;'>
|
715 |
Hệ thống gia sư AI thông minh với kiến trúc đa tác nhân tiên tiến,
|
716 |
mang đến trải nghiệm học tập cá nhân hóa và hiệu quả nhất.
|
717 |
</p>
|