cryogenic22 commited on
Commit
8d20b92
·
verified ·
1 Parent(s): e32a092

Update ui/components.py

Browse files
Files changed (1) hide show
  1. ui/components.py +8 -15
ui/components.py CHANGED
@@ -100,21 +100,14 @@ def show_chat_history(chat_history):
100
  st.markdown(chat.get('analysis', ''))
101
  st.markdown("---")
102
 
103
- def show_follow_up_section(key_suffix=""):
104
- """Show the follow-up question section with enhanced UI"""
105
- st.markdown("---") # Visual separator
106
-
107
- # Chat container
108
- chat_container = st.container()
109
- with chat_container:
110
- # Show conversation context if exists
111
- if 'conversation_context' in st.session_state:
112
- for msg in st.session_state.conversation_context:
113
- if msg['role'] == 'user':
114
- st.markdown(f"**You:** {msg['content']}")
115
- else:
116
- st.markdown(f"**Assistant:** {msg['content']}")
117
- st.markdown("---")
118
 
119
  # Input section
120
  col1, col2 = st.columns([4, 1])
 
100
  st.markdown(chat.get('analysis', ''))
101
  st.markdown("---")
102
 
103
+ def show_follow_up_section(key_suffix="", previous_response=None):
104
+ """Show the follow-up question section with enhanced chat UI"""
105
+ # Show previous response if provided
106
+ if previous_response:
107
+ with st.container():
108
+ st.markdown("**Previous Response:**")
109
+ st.markdown(previous_response)
110
+ st.markdown("---")
 
 
 
 
 
 
 
111
 
112
  # Input section
113
  col1, col2 = st.columns([4, 1])