Shubham170793 commited on
Commit
a0dee9a
Β·
verified Β·
1 Parent(s): 805f0d4

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +21 -1
src/streamlit_app.py CHANGED
@@ -97,9 +97,27 @@ st.caption("Upload a PDF or use the sample file to explore intelligent document
97
  # 🧭 Sidebar (Document Library + Settings + Diagnostics)
98
  # ==========================================================
99
  with st.sidebar:
 
100
  if os.path.exists(LOGO_PATH):
101
  st.image(LOGO_PATH, width=150)
102
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
  st.header("πŸ“š Document Library")
104
  doc_choice = st.radio(
105
  "Choose a document:",
@@ -109,12 +127,14 @@ with st.sidebar:
109
 
110
  st.markdown("---")
111
 
 
112
  st.header("βš™οΈ Settings")
113
- reasoning_mode = st.toggle("🧠 Enable Reasoning Mode", value=True)
114
  chunk_size = st.slider("Chunk Size (characters)", 300, 1200, 800, step=100)
115
  top_k = st.slider("Top K Results (retrieved chunks)", 1, 10, 5)
116
 
117
  st.markdown("---")
 
 
118
  st.caption("πŸ‘¨β€πŸ’» Built by Shubham Sharma")
119
  st.markdown("[πŸ“‚ GitHub Repo](https://github.com/shubhamsharma170793-cpu/enterprise-knowledge-assistant)")
120
 
 
97
  # 🧭 Sidebar (Document Library + Settings + Diagnostics)
98
  # ==========================================================
99
  with st.sidebar:
100
+ # πŸ–ΌοΈ App Logo (if available)
101
  if os.path.exists(LOGO_PATH):
102
  st.image(LOGO_PATH, width=150)
103
 
104
+ # 🧠 Reasoning Mode Toggle (Persistent)
105
+ if "reasoning_mode" not in st.session_state:
106
+ st.session_state.reasoning_mode = True # Default ON
107
+
108
+ st.session_state.reasoning_mode = st.toggle(
109
+ "🧠 Enable Reasoning Mode",
110
+ value=st.session_state.reasoning_mode,
111
+ help=(
112
+ "When ON, the assistant can use its world knowledge and reasoning ability "
113
+ "to generate richer, more explanatory answers.\n\n"
114
+ "When OFF, it sticks strictly to the document text for factual accuracy."
115
+ )
116
+ )
117
+
118
+ st.markdown("---")
119
+
120
+ # πŸ“š Document Library
121
  st.header("πŸ“š Document Library")
122
  doc_choice = st.radio(
123
  "Choose a document:",
 
127
 
128
  st.markdown("---")
129
 
130
+ # βš™οΈ Settings
131
  st.header("βš™οΈ Settings")
 
132
  chunk_size = st.slider("Chunk Size (characters)", 300, 1200, 800, step=100)
133
  top_k = st.slider("Top K Results (retrieved chunks)", 1, 10, 5)
134
 
135
  st.markdown("---")
136
+
137
+ # πŸ‘¨β€πŸ’» Branding
138
  st.caption("πŸ‘¨β€πŸ’» Built by Shubham Sharma")
139
  st.markdown("[πŸ“‚ GitHub Repo](https://github.com/shubhamsharma170793-cpu/enterprise-knowledge-assistant)")
140