Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -40,9 +40,9 @@ with gr.Blocks(theme=gr.themes.Glass()) as demo:
|
|
| 40 |
messages_history3 = [[None,languagedict['English']['helpfirst']]]
|
| 41 |
messages_history1 += {"role": "system", "content": themewhatcanido}
|
| 42 |
messages_history1 += {"role": "assistant", "content": languagedict['English']['whatcanidofirst']}
|
| 43 |
-
messages_history2 += {"role": "system", "content":
|
| 44 |
messages_history2 += {"role": "assistant", "content": languagedict['English']['interviewquestionsfirst']}
|
| 45 |
-
messages_history3 += {"role": "system", "content":
|
| 46 |
messages_history3 += {"role": "assistant", "content": languagedict['English']['helpfirst']}
|
| 47 |
return messages_history1, messages_history2, messages_history3
|
| 48 |
|
|
@@ -57,9 +57,9 @@ with gr.Blocks(theme=gr.themes.Glass()) as demo:
|
|
| 57 |
if mode == "mode1":
|
| 58 |
context = themewhatcanido
|
| 59 |
elif mode == "mode2":
|
| 60 |
-
context =
|
| 61 |
else:
|
| 62 |
-
context =
|
| 63 |
|
| 64 |
#remind mission
|
| 65 |
if len(state) == 0:
|
|
@@ -139,7 +139,7 @@ Then, when you have enough information, you will thank them and suggest some opt
|
|
| 139 |
IMPORTANT: write in {language}, in the style of a native inhabitant from Kowloon
|
| 140 |
"""
|
| 141 |
|
| 142 |
-
|
| 143 |
You are an interviewer, interviewing a candidate for a role [the role will be specified to you].
|
| 144 |
Your candidates have limited skills, please find ways to support them and ask all the questions.
|
| 145 |
After the candidate answered, write:
|
|
@@ -168,7 +168,7 @@ IMPORTANT: write in {language}, in the style of a native inhabitant from Kowloon
|
|
| 168 |
instructions = gr.Textbox(label = 'Instructions', lines=10, max_lines= 100, visible = False)
|
| 169 |
clear = gr.Button('Clear')
|
| 170 |
|
| 171 |
-
|
| 172 |
You are a social worker, you need to provide some help to the user. He can ask questions relative to:
|
| 173 |
- care support for children or elderly in Hong Kong
|
| 174 |
- health
|
|
|
|
| 40 |
messages_history3 = [[None,languagedict['English']['helpfirst']]]
|
| 41 |
messages_history1 += {"role": "system", "content": themewhatcanido}
|
| 42 |
messages_history1 += {"role": "assistant", "content": languagedict['English']['whatcanidofirst']}
|
| 43 |
+
messages_history2 += {"role": "system", "content": themeinterviewquestions}
|
| 44 |
messages_history2 += {"role": "assistant", "content": languagedict['English']['interviewquestionsfirst']}
|
| 45 |
+
messages_history3 += {"role": "system", "content": themehelp}
|
| 46 |
messages_history3 += {"role": "assistant", "content": languagedict['English']['helpfirst']}
|
| 47 |
return messages_history1, messages_history2, messages_history3
|
| 48 |
|
|
|
|
| 57 |
if mode == "mode1":
|
| 58 |
context = themewhatcanido
|
| 59 |
elif mode == "mode2":
|
| 60 |
+
context = themeinterviewquestions
|
| 61 |
else:
|
| 62 |
+
context = themehelp
|
| 63 |
|
| 64 |
#remind mission
|
| 65 |
if len(state) == 0:
|
|
|
|
| 139 |
IMPORTANT: write in {language}, in the style of a native inhabitant from Kowloon
|
| 140 |
"""
|
| 141 |
|
| 142 |
+
themeinterviewquestions = f"""
|
| 143 |
You are an interviewer, interviewing a candidate for a role [the role will be specified to you].
|
| 144 |
Your candidates have limited skills, please find ways to support them and ask all the questions.
|
| 145 |
After the candidate answered, write:
|
|
|
|
| 168 |
instructions = gr.Textbox(label = 'Instructions', lines=10, max_lines= 100, visible = False)
|
| 169 |
clear = gr.Button('Clear')
|
| 170 |
|
| 171 |
+
themehelp = f"""
|
| 172 |
You are a social worker, you need to provide some help to the user. He can ask questions relative to:
|
| 173 |
- care support for children or elderly in Hong Kong
|
| 174 |
- health
|