Spaces:
Running
Running
Aditya Bakshi
commited on
Add reset button to top of sidebar
Browse files
app.py
CHANGED
|
@@ -164,6 +164,12 @@ texts = list(GlobalConfig.PPTX_TEMPLATE_FILES.keys())
|
|
| 164 |
captions = [GlobalConfig.PPTX_TEMPLATE_FILES[x]['caption'] for x in texts]
|
| 165 |
|
| 166 |
with st.sidebar:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 167 |
# The PPT templates
|
| 168 |
pptx_template = st.sidebar.radio(
|
| 169 |
'1: Select a presentation template:',
|
|
@@ -330,12 +336,7 @@ def set_up_chat_ui():
|
|
| 330 |
file_type=['pdf', ],
|
| 331 |
)
|
| 332 |
|
| 333 |
-
|
| 334 |
-
with bottom():
|
| 335 |
-
col1, col2, col3 = st.columns([1, 1, 1])
|
| 336 |
-
with col2:
|
| 337 |
-
if st.button("🔄 Reset Chat", help="Clear chat history and start a new conversation", use_container_width=True):
|
| 338 |
-
reset_chat_history()
|
| 339 |
|
| 340 |
if prompt:
|
| 341 |
prompt_text = prompt.text or ''
|
|
|
|
| 164 |
captions = [GlobalConfig.PPTX_TEMPLATE_FILES[x]['caption'] for x in texts]
|
| 165 |
|
| 166 |
with st.sidebar:
|
| 167 |
+
# Reset button at the top of sidebar
|
| 168 |
+
if st.button("🔄 Reset Chat", help="Clear chat history and start a new conversation", use_container_width=True):
|
| 169 |
+
reset_chat_history()
|
| 170 |
+
|
| 171 |
+
st.markdown("---") # Separator
|
| 172 |
+
|
| 173 |
# The PPT templates
|
| 174 |
pptx_template = st.sidebar.radio(
|
| 175 |
'1: Select a presentation template:',
|
|
|
|
| 336 |
file_type=['pdf', ],
|
| 337 |
)
|
| 338 |
|
| 339 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 340 |
|
| 341 |
if prompt:
|
| 342 |
prompt_text = prompt.text or ''
|