Commit ·
bac1636
1
Parent(s): 5536dda
ui changes
Browse files- ui/pages/Chat.py +7 -1
- ui/pages/Documents.py +4 -2
ui/pages/Chat.py
CHANGED
|
@@ -9,7 +9,13 @@ API_URL = os.getenv("API_URL", "http://localhost:8000/")
|
|
| 9 |
|
| 10 |
|
| 11 |
st.set_page_config(page_title="Chat App", page_icon="💬")
|
| 12 |
-
st.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
if "messages" not in st.session_state:
|
| 15 |
st.session_state.messages = []
|
|
|
|
| 9 |
|
| 10 |
|
| 11 |
st.set_page_config(page_title="Chat App", page_icon="💬")
|
| 12 |
+
col_title, col_btn = st.columns([0.8, 0.2])
|
| 13 |
+
with col_title:
|
| 14 |
+
st.title("💬 Chat Interface")
|
| 15 |
+
with col_btn:
|
| 16 |
+
if st.button("Clear Chat History"):
|
| 17 |
+
st.session_state.messages = []
|
| 18 |
+
st.rerun()
|
| 19 |
|
| 20 |
if "messages" not in st.session_state:
|
| 21 |
st.session_state.messages = []
|
ui/pages/Documents.py
CHANGED
|
@@ -89,9 +89,11 @@ else:
|
|
| 89 |
filename, status, timestamp, path = doc
|
| 90 |
|
| 91 |
cols = st.columns([3, 2, 2, 1])
|
| 92 |
-
|
|
|
|
|
|
|
| 93 |
cols[0].write(filename)
|
| 94 |
-
cols[1].
|
| 95 |
cols[2].write(timestamp)
|
| 96 |
|
| 97 |
if cols[3].button(
|
|
|
|
| 89 |
filename, status, timestamp, path = doc
|
| 90 |
|
| 91 |
cols = st.columns([3, 2, 2, 1])
|
| 92 |
+
status_color = "green" if status == "ingested" else "orange"
|
| 93 |
+
status_display = f"✅ {status.capitalize()}" if status == "ingested" else f"⏳ {status.capitalize()}"
|
| 94 |
+
status_markdown = f"<span style='color:{status_color}'>{status_display}</span>"
|
| 95 |
cols[0].write(filename)
|
| 96 |
+
cols[1].markdown(status_markdown, unsafe_allow_html=True)
|
| 97 |
cols[2].write(timestamp)
|
| 98 |
|
| 99 |
if cols[3].button(
|