winglian commited on
Commit
4a2d9ba
1 Parent(s): a62ccaa

tweak layout a bit

Browse files

increase max tokens
hide reveal on dismiss

Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -28,6 +28,7 @@ class Pipeline:
28
  self.endpoint_id = endpoint_id
29
  self.name = name
30
  self.generation_config = {
 
31
  "top_k": 40,
32
  "top_p": 0.95,
33
  "temperature": 0.8,
@@ -212,7 +213,7 @@ with gr.Blocks() as arena:
212
  with gr.Row():
213
  with gr.Column():
214
  rlhf_persona = gr.Textbox(
215
- "", label="Persona Tags", interactive=True, visible=True, placeholder="Tell us about how you are judging the quality. ex: #CoT #SFW #NSFW #helpful #ethical #creativity", lines=1)
216
  message = gr.Textbox(
217
  label="What do you want to ask?",
218
  placeholder="Ask me anything.",
@@ -220,7 +221,7 @@ with gr.Blocks() as arena:
220
  )
221
  with gr.Column():
222
  system_msg = gr.Textbox(
223
- start_message, label="System Message", interactive=True, visible=True, placeholder="system prompt", lines=5)
224
 
225
  nudge_msg = gr.Textbox(
226
  "", label="Assistant Nudge", interactive=True, visible=True, placeholder="the first words of the assistant response to nudge them in the right direction.", lines=2)
@@ -296,10 +297,12 @@ with gr.Blocks() as arena:
296
  gr.update(visible=False),
297
  gr.update(visible=True),
298
  gr.update(visible=True),
 
 
299
  None,
300
  None,
301
  ),
302
- inputs=[], outputs=[message, choose1, choose2, dismiss_reveal, clear, submit, chatbot1, chatbot2], queue=True
303
  )
304
 
305
  arena.queue(concurrency_count=5, max_size=16).launch(debug=True, server_name="0.0.0.0", server_port=7860)
 
28
  self.endpoint_id = endpoint_id
29
  self.name = name
30
  self.generation_config = {
31
+ "max_tokens": 1024,
32
  "top_k": 40,
33
  "top_p": 0.95,
34
  "temperature": 0.8,
 
213
  with gr.Row():
214
  with gr.Column():
215
  rlhf_persona = gr.Textbox(
216
+ "", label="Persona Tags", interactive=True, visible=True, placeholder="Tell us about how you are judging the quality. ex: #CoT #SFW #NSFW #helpful #ethical #creativity", lines=2)
217
  message = gr.Textbox(
218
  label="What do you want to ask?",
219
  placeholder="Ask me anything.",
 
221
  )
222
  with gr.Column():
223
  system_msg = gr.Textbox(
224
+ start_message, label="System Message", interactive=True, visible=True, placeholder="system prompt", lines=8)
225
 
226
  nudge_msg = gr.Textbox(
227
  "", label="Assistant Nudge", interactive=True, visible=True, placeholder="the first words of the assistant response to nudge them in the right direction.", lines=2)
 
297
  gr.update(visible=False),
298
  gr.update(visible=True),
299
  gr.update(visible=True),
300
+ gr.update(visible=False),
301
+ gr.update(visible=False),
302
  None,
303
  None,
304
  ),
305
+ inputs=[], outputs=[message, choose1, choose2, dismiss_reveal, clear, submit, reveal1, reveal2, chatbot1, chatbot2], queue=True
306
  )
307
 
308
  arena.queue(concurrency_count=5, max_size=16).launch(debug=True, server_name="0.0.0.0", server_port=7860)