Guiyom commited on
Commit
8338a7e
·
1 Parent(s): 97923cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -169,11 +169,11 @@ with gr.Blocks(theme=gr.themes.Glass()) as demo:
169
  with gr.Tab(f"{languagedict['English']['whatcanido']} / {languagedict['廣東話']['whatcanido']}"):
170
  chatbot1 = gr.Chatbot([[None,languagedict['English']['whatcanidofirst']]])
171
  input1 = gr.Textbox(label = languagedict['English']['whatcanidolabel'])
172
- state1 = gr.State([[{"role": "system", "content": themewhatcanido},{"role": "assistant", "content": languagedict['English']['whatcanidofirst']}]])
173
  with gr.Tab(f"{languagedict['English']['interviewquestions']} / {languagedict['廣東話']['interviewquestions']}"):
174
  chatbot2 = gr.Chatbot([[None,languagedict['English']['interviewquestionsfirst']]])
175
  input2 = gr.Textbox(label = languagedict['English']['interviewquestionslabel'])
176
- state2 = gr.State([[{"role": "system", "content": themeinterviewquestions},{"role": "assistant", "content": languagedict['English']['interviewquestionsfirst']}]])
177
  with gr.Tab(f"{languagedict['English']['help']} / {languagedict['廣東話']['help']}"):
178
  chatbot3 = gr.Chatbot([[None,languagedict['English']['helpfirst']]])
179
  input3 = gr.Textbox(label = languagedict['English']['helplabel'])
@@ -181,7 +181,7 @@ with gr.Blocks(theme=gr.themes.Glass()) as demo:
181
  code = gr.Textbox(label = 'Code')
182
  instructions = gr.Textbox(label = 'Instructions', lines=10, max_lines= 100, visible = False)
183
  complement = f"To answer, use primarily the information indicated here:\n{instructions}"
184
- state3 = gr.State([[{"role": "system", "content": themehelp + f"\n{complement}"},{"role": "assistant", "content": languagedict['English']['helpfirst']}]])
185
  clear = gr.Button('Clear')
186
 
187
  with gr.Column(scale = 1):
 
169
  with gr.Tab(f"{languagedict['English']['whatcanido']} / {languagedict['廣東話']['whatcanido']}"):
170
  chatbot1 = gr.Chatbot([[None,languagedict['English']['whatcanidofirst']]])
171
  input1 = gr.Textbox(label = languagedict['English']['whatcanidolabel'])
172
+ state1 = gr.State([{"role": "system", "content": themewhatcanido},{"role": "assistant", "content": languagedict['English']['whatcanidofirst']}])
173
  with gr.Tab(f"{languagedict['English']['interviewquestions']} / {languagedict['廣東話']['interviewquestions']}"):
174
  chatbot2 = gr.Chatbot([[None,languagedict['English']['interviewquestionsfirst']]])
175
  input2 = gr.Textbox(label = languagedict['English']['interviewquestionslabel'])
176
+ state2 = gr.State([{"role": "system", "content": themeinterviewquestions},{"role": "assistant", "content": languagedict['English']['interviewquestionsfirst']}])
177
  with gr.Tab(f"{languagedict['English']['help']} / {languagedict['廣東話']['help']}"):
178
  chatbot3 = gr.Chatbot([[None,languagedict['English']['helpfirst']]])
179
  input3 = gr.Textbox(label = languagedict['English']['helplabel'])
 
181
  code = gr.Textbox(label = 'Code')
182
  instructions = gr.Textbox(label = 'Instructions', lines=10, max_lines= 100, visible = False)
183
  complement = f"To answer, use primarily the information indicated here:\n{instructions}"
184
+ state3 = gr.State([{"role": "system", "content": themehelp + f"\n{complement}"},{"role": "assistant", "content": languagedict['English']['helpfirst']}])
185
  clear = gr.Button('Clear')
186
 
187
  with gr.Column(scale = 1):