Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +10 -2
src/streamlit_app.py
CHANGED
|
@@ -606,8 +606,16 @@ if st.session_state.execute_batch_analysis and 'json_data_for_batch' in st.sessi
|
|
| 606 |
is_medium = any(x in response.lower() for x in ['medium-risk detected!'])
|
| 607 |
if is_high:
|
| 608 |
b64 = base64.b64encode(csv_string.encode('utf-8'))
|
| 609 |
-
st.markdown(
|
| 610 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 611 |
with st.expander("序列內容 (JSON Format)"):
|
| 612 |
st.code(item["sequence_analyzed"], language='json')
|
| 613 |
st.error(item['analysis_result'])
|
|
|
|
| 606 |
is_medium = any(x in response.lower() for x in ['medium-risk detected!'])
|
| 607 |
if is_high:
|
| 608 |
b64 = base64.b64encode(csv_string.encode('utf-8'))
|
| 609 |
+
st.markdown(
|
| 610 |
+
f"""
|
| 611 |
+
<h3>
|
| 612 |
+
<a href="data:application/octet-stream;base64,{b64}" download="Log_{item['log_id']}.csv">
|
| 613 |
+
Log #{item['log_id']} (HIGH RISK DETECTED)
|
| 614 |
+
</a>
|
| 615 |
+
</h3>
|
| 616 |
+
""",
|
| 617 |
+
unsafe_allow_html=True
|
| 618 |
+
)
|
| 619 |
with st.expander("序列內容 (JSON Format)"):
|
| 620 |
st.code(item["sequence_analyzed"], language='json')
|
| 621 |
st.error(item['analysis_result'])
|