mgbam commited on
Commit
b657573
Β·
verified Β·
1 Parent(s): 7e6d090

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -5
app.py CHANGED
@@ -1,12 +1,14 @@
1
  import streamlit as st
2
- from interm import generate_clinical_content, generate_summary, generate_soap_note, save_as_text, save_as_pdf
 
 
 
3
 
4
- # Title & Introduction
5
  st.title("🩺 AI-Powered Clinical Intelligence Assistant")
6
- st.write("Revolutionizing **clinical documentation, research summarization, and medical education** using AI.")
7
 
8
  # Tabs for different functionalities
9
- tabs = st.tabs(["πŸ“ Clinical Content", "πŸ“‘ Research Summaries", "🩺 SOAP Notes", "πŸ“Š Medical Reports"])
10
 
11
  # Tab 1: Generate Clinical Content
12
  with tabs[0]:
@@ -56,8 +58,27 @@ with tabs[2]:
56
  else:
57
  st.warning("Please enter patient symptoms.")
58
 
59
- # Tab 4: Download Clinical Reports
60
  with tabs[3]:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  st.header("Download Clinical Reports")
62
 
63
  if "soap_note" in st.session_state:
 
1
  import streamlit as st
2
+ from interm import generate_clinical_content, generate_summary, generate_soap_note, fetch_pubmed_articles, save_as_text, save_as_pdf
3
+
4
+ # Set page configuration
5
+ st.set_page_config(page_title="Clinical AI Assistant", page_icon="🩺", layout="wide")
6
 
 
7
  st.title("🩺 AI-Powered Clinical Intelligence Assistant")
8
+ st.write("AI-driven **clinical research, medical documentation, and PubMed insights**.")
9
 
10
  # Tabs for different functionalities
11
+ tabs = st.tabs(["πŸ“ Clinical Content", "πŸ“‘ Research Summaries", "🩺 SOAP Notes", "πŸ” PubMed Research", "πŸ“Š Medical Reports"])
12
 
13
  # Tab 1: Generate Clinical Content
14
  with tabs[0]:
 
58
  else:
59
  st.warning("Please enter patient symptoms.")
60
 
61
+ # Tab 4: PubMed Research Integration
62
  with tabs[3]:
63
+ st.header("Fetch Latest Research from PubMed")
64
+
65
+ query = st.text_input("Enter a medical keyword (e.g., COVID-19, AI in Oncology, Diabetes):")
66
+
67
+ if st.button("Fetch PubMed Articles"):
68
+ if query:
69
+ with st.spinner("Retrieving PubMed articles..."):
70
+ articles = fetch_pubmed_articles(query)
71
+ st.session_state["pubmed_results"] = articles
72
+ for article in articles:
73
+ st.subheader(article["title"])
74
+ st.write(f"**Authors:** {article['authors']}")
75
+ st.write(f"**Abstract:** {article['abstract']}")
76
+ st.write(f"[Read More]({article['url']})")
77
+ else:
78
+ st.warning("Please enter a medical topic.")
79
+
80
+ # Tab 5: Download Clinical Reports
81
+ with tabs[4]:
82
  st.header("Download Clinical Reports")
83
 
84
  if "soap_note" in st.session_state: