-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstreamlit_app.py
More file actions
40 lines (33 loc) · 927 Bytes
/
streamlit_app.py
File metadata and controls
40 lines (33 loc) · 927 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
"""
Streamlit Chat UI for Hybrid Search RAG API
Run with: streamlit run streamlit_app.py
"""
import streamlit as st
from ui.styles import inject_styles
from ui.sidebar import render_sidebar
from ui.chat import init_session_state, render_chat_history, handle_chat_input, render_footer
st.set_page_config(
page_title="RAG Assistant",
page_icon="🤖",
layout="wide",
initial_sidebar_state="expanded",
)
inject_styles()
init_session_state()
render_sidebar()
if not st.session_state.session_id:
st.markdown(
"""
<div class="welcome-container">
<span class="welcome-icon">🤖</span>
<h2>RAG Chat Assistant</h2>
<p>Create or load a session from the sidebar to start chatting
with your documents.</p>
</div>
""",
unsafe_allow_html=True,
)
st.stop()
render_chat_history()
handle_chat_input()
render_footer()