Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ class MyApp:
|
|
14 |
self.documents = []
|
15 |
self.embeddings = None
|
16 |
self.index = None
|
17 |
-
self.load_pdf("
|
18 |
self.build_vector_db()
|
19 |
|
20 |
def load_pdf(self, file_path: str) -> None:
|
@@ -115,17 +115,34 @@ with gr.Blocks() as demo:
|
|
115 |
refresh_btn = gr.Button("Refresh Chat", scale=1, variant="secondary")
|
116 |
|
117 |
example_questions = [
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
|
130 |
gr.Examples(examples=example_questions, inputs=[txt_input])
|
131 |
|
|
|
14 |
self.documents = []
|
15 |
self.embeddings = None
|
16 |
self.index = None
|
17 |
+
self.load_pdf("DB.pdf")
|
18 |
self.build_vector_db()
|
19 |
|
20 |
def load_pdf(self, file_path: str) -> None:
|
|
|
115 |
refresh_btn = gr.Button("Refresh Chat", scale=1, variant="secondary")
|
116 |
|
117 |
example_questions = [
|
118 |
+
["What are some techniques to handle distressing situations?"],
|
119 |
+
["How does DBT help with emotional regulation?"],
|
120 |
+
["Can you give me an example of an interpersonal effectiveness skill?"],
|
121 |
+
["I want to practice mindfulness. Can you help me?"],
|
122 |
+
["I want to practice distraction techniques. What can I do?"],
|
123 |
+
["How do I plan self-accommodation?"],
|
124 |
+
["What are some distress tolerance skills?"],
|
125 |
+
["Can you help me with emotional regulation techniques?"],
|
126 |
+
["How can I improve my interpersonal effectiveness?"],
|
127 |
+
["What are some ways to cope with stress using DBT?"],
|
128 |
+
["Can you guide me through a grounding exercise?"],
|
129 |
+
["How do I use DBT skills to handle intense emotions?"],
|
130 |
+
["What are some self-soothing techniques I can practice?"],
|
131 |
+
["How can I create a sensory-friendly safe space?"],
|
132 |
+
["Can you help me create a personal crisis plan?"],
|
133 |
+
["What are some affirmations for neurodivergent individuals?"],
|
134 |
+
["How can I manage rejection sensitive dysphoria?"],
|
135 |
+
["Can you guide me through observing with my senses?"],
|
136 |
+
["What are some accessible mindfulness exercises?"],
|
137 |
+
["How do I engage my wise mind?"],
|
138 |
+
["What are some values that I can identify with?"],
|
139 |
+
["How can I practice mindful appreciation?"],
|
140 |
+
["What is the STOP skill in distress tolerance?"],
|
141 |
+
["How can I use the TIPP skill to manage distress?"],
|
142 |
+
["What are some tips for managing meltdowns?"],
|
143 |
+
["Can you provide a list of stims that I can use?"],
|
144 |
+
["How do I improve my environment to reduce distress?"]
|
145 |
+
]
|
146 |
|
147 |
gr.Examples(examples=example_questions, inputs=[txt_input])
|
148 |
|