Dashboard: add news section
Browse files- src/wam/webapp/dashboard.py +14 -0
src/wam/webapp/dashboard.py
CHANGED
|
@@ -126,3 +126,17 @@ def render(cfg: Config) -> None:
|
|
| 126 |
column_config={"s2": st.column_config.LinkColumn("s2")})
|
| 127 |
else:
|
| 128 |
st.info("No authors yet.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 126 |
column_config={"s2": st.column_config.LinkColumn("s2")})
|
| 127 |
else:
|
| 128 |
st.info("No authors yet.")
|
| 129 |
+
|
| 130 |
+
# --- News ---
|
| 131 |
+
st.subheader("📰 Embodied / physical-AI news")
|
| 132 |
+
nrows = con.execute("SELECT title, authors_json, published, links_json FROM papers "
|
| 133 |
+
"WHERE track='news' ORDER BY published DESC LIMIT 50").fetchall()
|
| 134 |
+
if nrows:
|
| 135 |
+
ndf = pd.DataFrame([{
|
| 136 |
+
"date": pub or "", "outlet": (json.loads(aj or "[]") or [""])[0], "title": t,
|
| 137 |
+
"link": json.loads(lj or "{}").get("abs", "")}
|
| 138 |
+
for t, aj, pub, lj in nrows])
|
| 139 |
+
st.dataframe(ndf, use_container_width=True, hide_index=True,
|
| 140 |
+
column_config={"link": st.column_config.LinkColumn("link")})
|
| 141 |
+
else:
|
| 142 |
+
st.info("No news items yet.")
|