File size: 577 Bytes
95b2ec1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import streamlit as st

st.title("🧠 AI Therapist")

if "history" not in st.session_state:
    st.session_state.history = []

user_input = st.text_input("How are you feeling today?")

if user_input:
    response = therapist_pipeline(user_input)
    st.session_state.history.append((user_input, response))

for user, bot in st.session_state.history:
    st.markdown(f"**You:** {user}")
    st.markdown(f"**AI Therapist:** {bot}")

if st.button("🧾 Get Session Summary"):
    summary = summarize_session()
    st.markdown("### 🧠 Session Summary")
    st.markdown(summary)