IJ-Reynolds HF Staff commited on
Commit
c53a8ee
·
verified ·
1 Parent(s): 5d4f50f

Update streamlit_app.py

Browse files
Files changed (1) hide show
  1. streamlit_app.py +6 -6
streamlit_app.py CHANGED
@@ -88,7 +88,7 @@ start_background_scheduler()
88
  st.set_page_config(page_title="PolicyPilot Intel", layout="wide")
89
  st.title("AI Policy and News Dashboard - ALPHA Version")
90
 
91
- # RESTORED: Original Onboarding Text
92
  st.markdown("""
93
  Welcome to the **AI Policy and News Dashboard**, an automated platform tracking technology policy developments, legislative movement, and media coverage.
94
 
@@ -109,7 +109,7 @@ To help you scan the chronological timeline quickly, entries are color-coded:
109
  To generate a high-level summary of the most recent data entries, click the **"Generate Briefing"** button below.
110
  """)
111
 
112
- # RESTORED: Warning Notes
113
  st.markdown("""
114
  ---
115
  ### Notes for Users
@@ -117,7 +117,7 @@ st.markdown("""
117
  2. **Work in Progress:** This is an alpha version. Improvements in coverage and AI logic will be made regularly.
118
  """)
119
 
120
- # RESTORED: Expanded Architecture Notes
121
  with st.expander("🛠️ Technical Details & Architecture"):
122
  st.markdown("""
123
  * **AI Engine:** Summaries and keyword extraction are powered by **Meta-Llama-3.1-8B-Instruct**.
@@ -160,7 +160,7 @@ with st.sidebar:
160
  with data_lock: csv_data = active_df.to_csv(index=False).encode('utf-8')
161
  st.download_button(label="Download Historical Archive (CSV)", data=csv_data, file_name=f"policy_pilot_archive_{pd.Timestamp.now().strftime('%Y-%m-%d')}.csv", mime="text/csv", use_container_width=True)
162
 
163
- # --- EXECUTIVE BRIEFING ---
164
  if active_df is not None and not active_df.empty:
165
  st.subheader("Executive Intel Briefing")
166
  if 'exec_briefing' not in st.session_state:
@@ -173,9 +173,9 @@ if active_df is not None and not active_df.empty:
173
  top_items = active_df.head(10)
174
  context = "\n".join([f"- {row['title']} (Source: {row['source']})" for _, row in top_items.iterrows()])
175
 
176
- # AI Prompt
177
  messages = [
178
- {"role": "system", "content": "Summarize the following data into 3 concise, bullets, citing sources inline. Do not include facts/information not aligned with the original data"},
179
  {"role": "user", "content": f"Summarize these updates:\n\n{context}"}
180
  ]
181
  try:
 
88
  st.set_page_config(page_title="PolicyPilot Intel", layout="wide")
89
  st.title("AI Policy and News Dashboard - ALPHA Version")
90
 
91
+ # Onboarding Text
92
  st.markdown("""
93
  Welcome to the **AI Policy and News Dashboard**, an automated platform tracking technology policy developments, legislative movement, and media coverage.
94
 
 
109
  To generate a high-level summary of the most recent data entries, click the **"Generate Briefing"** button below.
110
  """)
111
 
112
+ # Warning Notes
113
  st.markdown("""
114
  ---
115
  ### Notes for Users
 
117
  2. **Work in Progress:** This is an alpha version. Improvements in coverage and AI logic will be made regularly.
118
  """)
119
 
120
+ # Expanded Architecture Notes
121
  with st.expander("🛠️ Technical Details & Architecture"):
122
  st.markdown("""
123
  * **AI Engine:** Summaries and keyword extraction are powered by **Meta-Llama-3.1-8B-Instruct**.
 
160
  with data_lock: csv_data = active_df.to_csv(index=False).encode('utf-8')
161
  st.download_button(label="Download Historical Archive (CSV)", data=csv_data, file_name=f"policy_pilot_archive_{pd.Timestamp.now().strftime('%Y-%m-%d')}.csv", mime="text/csv", use_container_width=True)
162
 
163
+ # --- BRIEFING ---
164
  if active_df is not None and not active_df.empty:
165
  st.subheader("Executive Intel Briefing")
166
  if 'exec_briefing' not in st.session_state:
 
173
  top_items = active_df.head(10)
174
  context = "\n".join([f"- {row['title']} (Source: {row['source']})" for _, row in top_items.iterrows()])
175
 
176
+ # AI Prompt forcing policy prioritization
177
  messages = [
178
+ {"role": "system", "content": "You are an objective AI intelligence analyst. Summarize the following data into 3 concise, actionable bullets. Prioritize legislation and federal/executive actions over general news. Cite sources inline."},
179
  {"role": "user", "content": f"Summarize these updates:\n\n{context}"}
180
  ]
181
  try: