File size: 502 Bytes
e9e7273 50a305b e9e7273 0554619 e9e7273 50a305b 0554619 e9e7273 50a305b e9e7273 50a305b 0554619 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# dashboard/logs.py
import streamlit as st
import pandas as pd
import os
import sqlite3
# Use the HF‐writable temp path
DB_PATH = os.path.join("/tmp", "memory.db")
def show_logs():
st.header("🧠 Agent Memory Log Dashboard")
conn = sqlite3.connect(DB_PATH)
df = pd.read_sql("SELECT * FROM agent_logs ORDER BY timestamp DESC", conn)
conn.close()
st.dataframe(df)
csv = df.to_csv(index=False).encode()
st.download_button("📥 Download Logs CSV", csv, "agent_logs.csv")
|