Spaces:
Running
Running
Update streamlit_app.py
Browse files- streamlit_app.py +32 -12
streamlit_app.py
CHANGED
|
@@ -110,26 +110,46 @@ def start_background_scheduler():
|
|
| 110 |
|
| 111 |
start_background_scheduler()
|
| 112 |
|
| 113 |
-
# --- UI SETUP ---
|
| 114 |
st.set_page_config(page_title="PolicyPilot Intel", layout="wide")
|
| 115 |
-
st.title("
|
| 116 |
|
|
|
|
| 117 |
st.markdown("""
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 121 |
""")
|
| 122 |
|
| 123 |
-
|
|
|
|
| 124 |
st.markdown("""
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
|
|
|
| 128 |
""")
|
| 129 |
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
|
|
|
|
|
|
| 133 |
selected_types = []
|
| 134 |
|
| 135 |
# --- SIDEBAR ---
|
|
|
|
| 110 |
|
| 111 |
start_background_scheduler()
|
| 112 |
|
| 113 |
+
# --- UI SETUP & ONBOARDING ---
|
| 114 |
st.set_page_config(page_title="PolicyPilot Intel", layout="wide")
|
| 115 |
+
st.title("AI Policy and News Dashboard - ALPHA Version")
|
| 116 |
|
| 117 |
+
# User Description Text
|
| 118 |
st.markdown("""
|
| 119 |
+
Welcome to the **AI Policy and News Dashboard**, an automated intelligence platform tracking technology policy developments, legislative movement, and relevant media coverage.
|
| 120 |
+
|
| 121 |
+
The portal will auto-populate with newly scanned data every 12 hours. You can also manually force a scan using the controls on the left side of the screen.
|
| 122 |
+
|
| 123 |
+
This portal's information is divided into two tabs:
|
| 124 |
+
* **Radar (Upcoming Hearings & Today's News):** Forward-looking legislative data and daily news updates.
|
| 125 |
+
* **Archive (Past):** Historical data record including news, legislation, and federal actions.
|
| 126 |
+
* **How to Filter:** Use the **Controls in the left sidebar** to filter by specific data categories or use the search bar below.
|
| 127 |
+
|
| 128 |
+
To generate a short summary of the most recent data entries, click the **"Generate Briefing"** button below.
|
| 129 |
+
""")
|
| 130 |
+
|
| 131 |
+
# Warning Notes
|
| 132 |
+
st.markdown("""
|
| 133 |
+
---
|
| 134 |
+
### Notes for Users
|
| 135 |
+
1. **Verify AI Outputs:** This portal leverages summaries generated by LLMs. All intelligence should be verified using the links to original sources.
|
| 136 |
+
2. **Work in Progress:** This is an alpha version. Improvements in coverage and AI logic will be made regularly.
|
| 137 |
""")
|
| 138 |
|
| 139 |
+
# Architecture Notes
|
| 140 |
+
with st.expander("Technical Details & Architecture"):
|
| 141 |
st.markdown("""
|
| 142 |
+
* **AI Engine:** Summaries and keyword extraction are powered by **Meta-Llama-3.1-8B-Instruct**, restricted by strict anti-hallucination prompting.
|
| 143 |
+
* **Data Sources:** Live API integration with Congress.gov, official federal RSS feeds, and master committee schedules.
|
| 144 |
+
* **The "Bouncer" (Filtering):** Articles and bills are strictly filtered against a hardcoded tech-policy dictionary before the AI reads them.
|
| 145 |
+
* **Data Retention:** News expires from the UI after 30 days, Schedules after 60 days. Legislation is retained for the duration of the current Congress.
|
| 146 |
""")
|
| 147 |
|
| 148 |
+
st.divider()
|
| 149 |
+
|
| 150 |
+
# Load Data
|
| 151 |
+
df = load_data()
|
| 152 |
+
active_df = apply_retention_and_priority(df)
|
| 153 |
selected_types = []
|
| 154 |
|
| 155 |
# --- SIDEBAR ---
|