Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -54,17 +54,16 @@ with gr.Blocks(theme=gr.themes.Glass()) as demo:
|
|
| 54 |
context = themeinterviewquestions
|
| 55 |
else:
|
| 56 |
context = themehelp
|
| 57 |
-
|
| 58 |
#remind mission
|
| 59 |
if len(state) == 0:
|
| 60 |
state.append({'role':'system','content':f"Take notice of your mission:\n\n{context}"})
|
| 61 |
elif len(state) > 10:
|
| 62 |
state.append({'role':'system','content':f"Remember your mission as briefed earlier:\n\n{context}"})
|
| 63 |
-
print(f'state is\n{state}')
|
| 64 |
-
|
| 65 |
chatbot.append([msg, None])
|
| 66 |
msg = msg + f"\n\nAnswer in {language}"
|
| 67 |
state.append({'role':'user','content':msg})
|
|
|
|
|
|
|
| 68 |
return "", chatbot, state
|
| 69 |
|
| 70 |
def bot(chatbot, state):
|
|
|
|
| 54 |
context = themeinterviewquestions
|
| 55 |
else:
|
| 56 |
context = themehelp
|
|
|
|
| 57 |
#remind mission
|
| 58 |
if len(state) == 0:
|
| 59 |
state.append({'role':'system','content':f"Take notice of your mission:\n\n{context}"})
|
| 60 |
elif len(state) > 10:
|
| 61 |
state.append({'role':'system','content':f"Remember your mission as briefed earlier:\n\n{context}"})
|
|
|
|
|
|
|
| 62 |
chatbot.append([msg, None])
|
| 63 |
msg = msg + f"\n\nAnswer in {language}"
|
| 64 |
state.append({'role':'user','content':msg})
|
| 65 |
+
print(f'state is\n{state}')
|
| 66 |
+
print(f'chatbot is\n{chatbot}')
|
| 67 |
return "", chatbot, state
|
| 68 |
|
| 69 |
def bot(chatbot, state):
|