Update app.py
Browse files
app.py
CHANGED
@@ -437,7 +437,7 @@ def simulate_rwd_analysis(adverse_event_text):
|
|
437 |
base_events = list(np.random.choice(['headache', 'nausea', 'fatigue', 'dizziness', 'rash', 'fever'], 100, p=[0.25, 0.2, 0.15, 0.15, 0.15, 0.1]))
|
438 |
user_events = [e.strip().lower() for e in adverse_event_text.split(',') if e.strip()]
|
439 |
all_events = base_events + user_events
|
440 |
-
|
441 |
log = f"✅ Analyzed {len(all_events)} simulated adverse event reports.\n"
|
442 |
|
443 |
plt.style.use('dark_background')
|
@@ -545,7 +545,16 @@ with tab1:
|
|
545 |
st.subheader("Protein 3D Structure (Interactive)")
|
546 |
st.components.v1.html(res1.get('protein_view_html', '<p>No data</p>'), height=600, scrolling=False)
|
547 |
st.subheader("FASTA Sequence Information")
|
548 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
549 |
with p1_tabs[1]:
|
550 |
st.subheader("Drug-Likeness Assessment (Lipinski's Rule of Five)")
|
551 |
st.dataframe(res1.get('lipinski_subset_df', pd.DataFrame()), use_container_width=True)
|
@@ -709,4 +718,4 @@ with tab4:
|
|
709 |
st.dataframe(res4.get('reg_df', pd.DataFrame()), use_container_width=True)
|
710 |
with col2:
|
711 |
st.subheader("Ethical Framework for AI in Healthcare")
|
712 |
-
st.dataframe(res4.get('eth_df', pd.DataFrame()), use_container_width=True)
|
|
|
437 |
base_events = list(np.random.choice(['headache', 'nausea', 'fatigue', 'dizziness', 'rash', 'fever'], 100, p=[0.25, 0.2, 0.15, 0.15, 0.15, 0.1]))
|
438 |
user_events = [e.strip().lower() for e in adverse_event_text.split(',') if e.strip()]
|
439 |
all_events = base_events + user_events
|
440 |
+
event_.value_counts()
|
441 |
log = f"✅ Analyzed {len(all_events)} simulated adverse event reports.\n"
|
442 |
|
443 |
plt.style.use('dark_background')
|
|
|
545 |
st.subheader("Protein 3D Structure (Interactive)")
|
546 |
st.components.v1.html(res1.get('protein_view_html', '<p>No data</p>'), height=600, scrolling=False)
|
547 |
st.subheader("FASTA Sequence Information")
|
548 |
+
# --- ACCESSIBILITY FIX ---
|
549 |
+
# Added a label and set visibility to "collapsed" to remove the warning
|
550 |
+
# without changing the visual layout.
|
551 |
+
st.text_area(
|
552 |
+
"FASTA log output",
|
553 |
+
res1.get('fasta_log', 'No data'),
|
554 |
+
height=200,
|
555 |
+
key="fasta_info_area",
|
556 |
+
label_visibility="collapsed"
|
557 |
+
)
|
558 |
with p1_tabs[1]:
|
559 |
st.subheader("Drug-Likeness Assessment (Lipinski's Rule of Five)")
|
560 |
st.dataframe(res1.get('lipinski_subset_df', pd.DataFrame()), use_container_width=True)
|
|
|
718 |
st.dataframe(res4.get('reg_df', pd.DataFrame()), use_container_width=True)
|
719 |
with col2:
|
720 |
st.subheader("Ethical Framework for AI in Healthcare")
|
721 |
+
st.dataframe(res4.get('eth_df', pd.DataFrame()), use_container_width=True)
|