Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,7 @@ import fitz # PyMuPDF
|
|
5 |
from sentence_transformers import SentenceTransformer
|
6 |
import numpy as np
|
7 |
import faiss
|
|
|
8 |
|
9 |
# Set up the Google API for the Gemini model
|
10 |
GOOGLE_API_KEY = os.environ.get("GOOGLE_API_KEY")
|
@@ -89,7 +90,7 @@ with gr.Blocks() as demo:
|
|
89 |
with gr.Row():
|
90 |
txt_input = gr.Textbox(
|
91 |
show_label=False,
|
92 |
-
placeholder="
|
93 |
lines=1
|
94 |
)
|
95 |
submit_btn = gr.Button("Submit", scale=1)
|
@@ -106,23 +107,7 @@ with gr.Blocks() as demo:
|
|
106 |
["Can you help me with emotional regulation techniques?"],
|
107 |
["How can I improve my interpersonal effectiveness?"],
|
108 |
["What are some ways to cope with stress using DBT?"],
|
109 |
-
["Can you guide me through a grounding exercise?"]
|
110 |
-
["How do I use DBT skills to handle intense emotions?"],
|
111 |
-
["What are some self-soothing techniques I can practice?"],
|
112 |
-
["How can I create a sensory-friendly safe space?"],
|
113 |
-
["Can you help me create a personal crisis plan?"],
|
114 |
-
["What are some affirmations for neurodivergent individuals?"],
|
115 |
-
["How can I manage rejection sensitive dysphoria?"],
|
116 |
-
["Can you guide me through observing with my senses?"],
|
117 |
-
["What are some accessible mindfulness exercises?"],
|
118 |
-
["How do I engage my wise mind?"],
|
119 |
-
["What are some values that I can identify with?"],
|
120 |
-
["How can I practice mindful appreciation?"],
|
121 |
-
["What is the STOP skill in distress tolerance?"],
|
122 |
-
["How can I use the TIPP skill to manage distress?"],
|
123 |
-
["What are some tips for managing meltdowns?"],
|
124 |
-
["Can you provide a list of stims that I can use?"],
|
125 |
-
["How do I improve my environment to reduce distress?"]
|
126 |
]
|
127 |
|
128 |
gr.Examples(examples=example_questions, inputs=[txt_input])
|
|
|
5 |
from sentence_transformers import SentenceTransformer
|
6 |
import numpy as np
|
7 |
import faiss
|
8 |
+
from typing import List, Tuple # Make sure to import List and Tuple
|
9 |
|
10 |
# Set up the Google API for the Gemini model
|
11 |
GOOGLE_API_KEY = os.environ.get("GOOGLE_API_KEY")
|
|
|
90 |
with gr.Row():
|
91 |
txt_input = gr.Textbox(
|
92 |
show_label=False,
|
93 |
+
placeholder="",
|
94 |
lines=1
|
95 |
)
|
96 |
submit_btn = gr.Button("Submit", scale=1)
|
|
|
107 |
["Can you help me with emotional regulation techniques?"],
|
108 |
["How can I improve my interpersonal effectiveness?"],
|
109 |
["What are some ways to cope with stress using DBT?"],
|
110 |
+
["Can you guide me through a grounding exercise?"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
]
|
112 |
|
113 |
gr.Examples(examples=example_questions, inputs=[txt_input])
|