Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion TalkHeal.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@ def get_tone_prompt():
else:
with main_area:
render_header()
st.subheader(f"🗣️ Current Chatbot Tone: **{st.session_state['selected_tone']}**")
st.markdown(f"""
<div style="text-align: center; margin: 20px 0;">
<h3>🗣️ Current Chatbot Tone: <strong>{st.session_state['selected_tone']}</strong></h3>
</div>
""", unsafe_allow_html=True)
render_chat_interface()
handle_chat_input(model, system_prompt=get_tone_prompt())

Expand Down
16 changes: 13 additions & 3 deletions components/sidebar.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,19 @@ def render_sidebar():
st.session_state.active_conversation = i
st.rerun()
with col2:
if st.button("🗑️", key=f"delete_{i}", type="primary"):
st.session_state.delete_candidate = i
st.rerun()
if convo["messages"]:
if st.button("🗑️", key=f"delete_{i}", type="primary", use_container_width=True):
st.session_state.delete_candidate = i
st.rerun()
else:
st.button(
"🗑️",
key=f"delete_{i}",
type="primary",
use_container_width=True,
disabled=not convo["messages"] # Disable if it's a new/empty conversation
)


else:
st.warning(
Expand Down
2 changes: 1 addition & 1 deletion css/styles.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ def apply_custom_css():
.stTextInput > div > div > input,
.stTextArea > div > div > textarea {{
background: var(--glass-effect) !important;
background-color: #FFFFD0 !important;
background-color: #FFDDEE !important;
border: 2px solid var(--border) !important;
border-radius: var(--radius) !important;
font-size: 1em !important;
Expand Down
2 changes: 1 addition & 1 deletion streamlit.toml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
GEMINI_API_KEY = "AIzaSyDsLJgA58LvgFtnUdVBLFb08GZQV0wXYjQ"
GEMINI_API_KEY = "AIzaSyDsLJgA58LvgFtnUdVBLFb08GZQV0wXYjQ"