Update app.py
Browse files
app.py
CHANGED
@@ -18,8 +18,7 @@ from funcs import detect_emotions, cosine_distance, generate_triggers_img, get_d
|
|
18 |
with gr.Blocks() as demo:
|
19 |
gr.Markdown("""# Falcon Cognitive Behavioural Therapy Assistant
|
20 |
- Your Personal AI Therapist. Start chatting...""")
|
21 |
-
|
22 |
-
chatbox = gr.State([])
|
23 |
|
24 |
img_paths = ['2.jpg','3.jpeg','4.jpeg','5.jpeg','6.jpeg']
|
25 |
img_path = random.choice(img_paths)
|
@@ -46,8 +45,7 @@ with gr.Blocks() as demo:
|
|
46 |
|
47 |
def summarize_and_recommend_process():
|
48 |
# sn, r = ps.summarize_and_recommend()
|
49 |
-
|
50 |
-
sn, r = summarize_and_recommend(chatbox)
|
51 |
|
52 |
return gr.update(visible=True, value=sn), gr.update(visible=True, value=r)
|
53 |
|
|
|
18 |
with gr.Blocks() as demo:
|
19 |
gr.Markdown("""# Falcon Cognitive Behavioural Therapy Assistant
|
20 |
- Your Personal AI Therapist. Start chatting...""")
|
21 |
+
therapy_session_conversation = gr.State([])
|
|
|
22 |
|
23 |
img_paths = ['2.jpg','3.jpeg','4.jpeg','5.jpeg','6.jpeg']
|
24 |
img_path = random.choice(img_paths)
|
|
|
45 |
|
46 |
def summarize_and_recommend_process():
|
47 |
# sn, r = ps.summarize_and_recommend()
|
48 |
+
sn, r = summarize_and_recommend([therapy_session_conversation])
|
|
|
49 |
|
50 |
return gr.update(visible=True, value=sn), gr.update(visible=True, value=r)
|
51 |
|