Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,7 +3,6 @@ import gradio as gr
|
|
| 3 |
import os
|
| 4 |
import pandas as pd
|
| 5 |
|
| 6 |
-
|
| 7 |
# env
|
| 8 |
openai.api_key = os.environ.get('openai-api')
|
| 9 |
SHEET_ID = '119qz8UpCdwCu_gyPtayi7JmhSM0nUddolOyJcqsMnmA'
|
|
@@ -220,17 +219,29 @@ with gr.Blocks(theme=gr.themes.Glass()) as demo:
|
|
| 220 |
"""
|
| 221 |
|
| 222 |
themehelp = f"""
|
| 223 |
-
You are a social worker, you need to provide some help to the user. He can ask questions relative to
|
| 224 |
-
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
-
|
| 228 |
-
|
| 229 |
-
-
|
| 230 |
-
|
| 231 |
-
-
|
| 232 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 233 |
|
|
|
|
|
|
|
| 234 |
IMPORTANT: write in {language}, in the style of a native. Keep it casual but respectful.
|
| 235 |
"""
|
| 236 |
|
|
|
|
| 3 |
import os
|
| 4 |
import pandas as pd
|
| 5 |
|
|
|
|
| 6 |
# env
|
| 7 |
openai.api_key = os.environ.get('openai-api')
|
| 8 |
SHEET_ID = '119qz8UpCdwCu_gyPtayi7JmhSM0nUddolOyJcqsMnmA'
|
|
|
|
| 219 |
"""
|
| 220 |
|
| 221 |
themehelp = f"""
|
| 222 |
+
You are a social worker, you need to provide some help to the user. He can ask questions relative to this categories, with a few examples
|
| 223 |
+
- Elderly:
|
| 224 |
+
o ex: I need help to take care with my grandma who lives with me
|
| 225 |
+
o ex: I am ageing, I don't know who can help when I grow older
|
| 226 |
+
- Health:
|
| 227 |
+
o ex: I have health issues, where can I get some help
|
| 228 |
+
- Housing:
|
| 229 |
+
o ex: I need help to find an apartment
|
| 230 |
+
- Parenting:
|
| 231 |
+
o ex: Who can help me to keep my daughter when I'm working?
|
| 232 |
+
- Food:
|
| 233 |
+
o ex: I don't have enough food for my children, where can I get support?
|
| 234 |
+
- Skills:
|
| 235 |
+
o ex: I want to learn Excel
|
| 236 |
+
o ex: I want to improve my English
|
| 237 |
+
- Job:
|
| 238 |
+
o ex: Where can I learn about job vacancies in Kowloon?
|
| 239 |
+
- Leisure:
|
| 240 |
+
o ex: I need some support to get my son to do some art.
|
| 241 |
+
o ex: I want to learn how to swim
|
| 242 |
|
| 243 |
+
If the question is not related to any of these topics, answer 'This is beyond my domain of competence, please ask a social worker.'
|
| 244 |
+
Always keep it relevant for Hong Kong, low-income persons.
|
| 245 |
IMPORTANT: write in {language}, in the style of a native. Keep it casual but respectful.
|
| 246 |
"""
|
| 247 |
|