Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +13 -9
src/streamlit_app.py
CHANGED
|
@@ -597,19 +597,23 @@ if st.session_state.execute_batch_analysis and 'json_data_for_batch' in st.sessi
|
|
| 597 |
|
| 598 |
with results_container:
|
| 599 |
st.subheader(f"Log/Alert #{item['log_id']} (IP Correlated Analysis)")
|
| 600 |
-
|
| 601 |
-
with st.expander("序列內容 (JSON Format)"):
|
| 602 |
-
st.code(item["sequence_analyzed"], language='json')
|
| 603 |
|
| 604 |
# 呈現 LLM 分析結果
|
| 605 |
is_high = any(x in response.lower() for x in ['high-risk detected'])
|
| 606 |
-
|
| 607 |
-
|
| 608 |
-
|
| 609 |
-
|
| 610 |
-
|
|
|
|
| 611 |
if is_medium:
|
| 612 |
-
st.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 613 |
|
| 614 |
if item['context']:
|
| 615 |
with st.expander("參考 RAG 片段"): st.code(item['context'])
|
|
|
|
| 597 |
|
| 598 |
with results_container:
|
| 599 |
st.subheader(f"Log/Alert #{item['log_id']} (IP Correlated Analysis)")
|
| 600 |
+
|
|
|
|
|
|
|
| 601 |
|
| 602 |
# 呈現 LLM 分析結果
|
| 603 |
is_high = any(x in response.lower() for x in ['high-risk detected'])
|
| 604 |
+
is_medium = any(x in response.lower() for x in ['medium-risk detected'])
|
| 605 |
+
if is_high:
|
| 606 |
+
with st.expander("序列內容 (JSON Format)"):
|
| 607 |
+
st.code(item["sequence_analyzed"], language='json')
|
| 608 |
+
st.error(item['analysis_result'])
|
| 609 |
+
elif:
|
| 610 |
if is_medium:
|
| 611 |
+
with st.expander("序列內容 (JSON Format)"):
|
| 612 |
+
st.code(item["sequence_analyzed"], language='json')
|
| 613 |
+
st.warning(item['analysis_result'])
|
| 614 |
+
else:
|
| 615 |
+
with st.expander("序列內容 (JSON Format)"):
|
| 616 |
+
st.code(item["sequence_analyzed"], language='json')
|
| 617 |
|
| 618 |
if item['context']:
|
| 619 |
with st.expander("參考 RAG 片段"): st.code(item['context'])
|