Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
|
3 |
+
st.title("🧠 AI Therapist")
|
4 |
+
|
5 |
+
if "history" not in st.session_state:
|
6 |
+
st.session_state.history = []
|
7 |
+
|
8 |
+
user_input = st.text_input("How are you feeling today?")
|
9 |
+
|
10 |
+
if user_input:
|
11 |
+
response = therapist_pipeline(user_input)
|
12 |
+
st.session_state.history.append((user_input, response))
|
13 |
+
|
14 |
+
for user, bot in st.session_state.history:
|
15 |
+
st.markdown(f"**You:** {user}")
|
16 |
+
st.markdown(f"**AI Therapist:** {bot}")
|
17 |
+
|
18 |
+
if st.button("🧾 Get Session Summary"):
|
19 |
+
summary = summarize_session()
|
20 |
+
st.markdown("### 🧠 Session Summary")
|
21 |
+
st.markdown(summary)
|