Spaces:
Sleeping
Sleeping
Update UI Frontend Version 1.1.0
Browse files
frontend/app.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
# Path: frontend/app.py
|
| 2 |
-
# Main application
|
| 3 |
import streamlit as st
|
| 4 |
from components import auth, sidebar, chat
|
| 5 |
|
|
|
|
| 1 |
# Path: frontend/app.py
|
| 2 |
+
# Main application entry point, setting up the app and routing.
|
| 3 |
import streamlit as st
|
| 4 |
from components import auth, sidebar, chat
|
| 5 |
|
frontend/assets/styles.css
ADDED
|
File without changes
|
frontend/components/__pycache__/chat.cpython-313.pyc
CHANGED
|
Binary files a/frontend/components/__pycache__/chat.cpython-313.pyc and b/frontend/components/__pycache__/chat.cpython-313.pyc differ
|
|
|
frontend/components/__pycache__/sidebar.cpython-313.pyc
CHANGED
|
Binary files a/frontend/components/__pycache__/sidebar.cpython-313.pyc and b/frontend/components/__pycache__/sidebar.cpython-313.pyc differ
|
|
|
frontend/components/chat.py
CHANGED
|
@@ -6,6 +6,7 @@ from utils import api
|
|
| 6 |
|
| 7 |
def render_chat_interface():
|
| 8 |
st.title(":material/sql: NL2SQL Assistant")
|
|
|
|
| 9 |
|
| 10 |
# Render existing messages
|
| 11 |
for msg in st.session_state['messages']:
|
|
|
|
| 6 |
|
| 7 |
def render_chat_interface():
|
| 8 |
st.title(":material/sql: NL2SQL Assistant")
|
| 9 |
+
st.divider()
|
| 10 |
|
| 11 |
# Render existing messages
|
| 12 |
for msg in st.session_state['messages']:
|
frontend/components/sidebar.py
CHANGED
|
@@ -5,12 +5,21 @@ from utils import api
|
|
| 5 |
|
| 6 |
def render_sidebar():
|
| 7 |
with st.sidebar:
|
|
|
|
|
|
|
| 8 |
if st.button(":material/add: New Chat", use_container_width=True):
|
| 9 |
st.session_state['current_session_id'] = None
|
| 10 |
st.session_state['messages'] = []
|
| 11 |
st.rerun()
|
| 12 |
st.divider()
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
# Guest View
|
| 15 |
if st.session_state['guest_mode']:
|
| 16 |
st.info("You are in Guest Mode. Your conversation history will not be saved.")
|
|
|
|
| 5 |
|
| 6 |
def render_sidebar():
|
| 7 |
with st.sidebar:
|
| 8 |
+
st.header(":material/sql:")
|
| 9 |
+
|
| 10 |
if st.button(":material/add: New Chat", use_container_width=True):
|
| 11 |
st.session_state['current_session_id'] = None
|
| 12 |
st.session_state['messages'] = []
|
| 13 |
st.rerun()
|
| 14 |
st.divider()
|
| 15 |
|
| 16 |
+
st.subheader("Model Selection")
|
| 17 |
+
model_options = st.selectbox(
|
| 18 |
+
"Choose a model:",
|
| 19 |
+
["Model A", "Model B"],
|
| 20 |
+
label_visibility="collapsed"
|
| 21 |
+
)
|
| 22 |
+
|
| 23 |
# Guest View
|
| 24 |
if st.session_state['guest_mode']:
|
| 25 |
st.info("You are in Guest Mode. Your conversation history will not be saved.")
|
requirements.txt
ADDED
|
Binary file (5.83 kB). View file
|
|
|