33 lines
872 B
Python
33 lines
872 B
Python
import streamlit as st
|
||
from agents import SQLiteSession
|
||
|
||
sidebar_style = """
|
||
<style>
|
||
[data-testid="stSidebar"][aria-expanded="true"]{
|
||
min-width: 300px;
|
||
max-width: 300px;
|
||
}
|
||
|
||
div.stButton > button {
|
||
background-color: #D6EDFF;
|
||
border: none;
|
||
}
|
||
|
||
div.stButton > button:hover {
|
||
background-color: #D6EDFF;
|
||
}
|
||
|
||
</style>
|
||
"""
|
||
|
||
def add_sidebar():
|
||
st.markdown(sidebar_style, unsafe_allow_html=True)
|
||
|
||
with st.sidebar:
|
||
|
||
st.title("⚖️ LawGPT")
|
||
st.markdown(":blue-badge[⚙️Tool] :orange-badge[⚠️Current chat will be deleted]")
|
||
if st.button(":material/note_stack_add: Create new chat"):
|
||
st.session_state.messages = []
|
||
st.session_state.chat_session = SQLiteSession(":memory:")
|