5to9 commited on
Commit
e08b1dc
1 Parent(s): 3338649

0.53 UI improvements

Browse files
Files changed (1) hide show
  1. app.py +12 -17
app.py CHANGED
@@ -227,37 +227,32 @@ with gr.Blocks() as demo:
227
  try:
228
  with gr.Column():
229
  gr.HTML(htmL_info)
230
- gr.HTML("<h2>Set prompt</h2>")
 
231
  with gr.Row(variant="compact"):
232
  with gr.Column(scale=0):
233
- language_dropdown = gr.Dropdown(
234
- choices=["English", "German", "French", "Spanish"],
235
- label="Select Language for System Prompt",
236
- value="English"
237
- )
238
  with gr.Column():
239
- system_prompt = gr.Textbox(
240
- lines=1,
241
- label="System Prompt",
242
- value=system_prompts["English"],
243
- show_copy_button=True
244
- )
245
  with gr.Accordion(label="Generation Configurations", open=False):
246
  max_new_tokens = gr.Slider(minimum=128, maximum=4096, value=512, label="Max new tokens", step=128)
247
  temperature = gr.Slider(minimum=0.0, maximum=1.0, value=0.7, label="Temperature", step=0.01)
248
  top_p = gr.Slider(minimum=0.0, maximum=1.0, value=0.97, label="Top_p", step=0.01)
249
  repetition_penalty = gr.Slider(minimum=0.1, maximum=2.0, value=1.1, label="Repetition Penalty", step=0.1)
250
 
251
- with gr.Row(variant="panel"):
252
- with gr.Column(scale=1):
253
- submit_btn = gr.Button(value="Generate", variant="primary")
254
- clear_btn = gr.Button(value="Clear", variant="secondary")
255
- input_text = gr.Textbox(lines=1, label="Prompt", value="Write a Nike style ad headline about the shame of being second best.", scale=3, show_copy_button=True)
256
  with gr.Row(variant="panel"):
257
  with gr.Column():
258
  chatbot_a = gr.Chatbot(label="Model A", show_copy_button=True, height=500)
259
  with gr.Column():
260
  chatbot_b = gr.Chatbot(label="Model B", show_copy_button=True, height=500)
 
 
261
  with gr.Row(variant="panel"):
262
  better_bot = gr.Radio(["Bot A kicks ass!", "Bot B crushes it!", "It's a draw."], label="Rate the output!")
263
 
 
227
  try:
228
  with gr.Column():
229
  gr.HTML(htmL_info)
230
+ gr.HTML("<h2>Set Parameters</h2>")
231
+
232
  with gr.Row(variant="compact"):
233
  with gr.Column(scale=0):
234
+ language_dropdown = gr.Dropdown(choices=["English", "German", "French", "Spanish"], label="Select Language for System Prompt",value="English")
 
 
 
 
235
  with gr.Column():
236
+ system_prompt = gr.Textbox(lines=1, label="System Prompt", value=system_prompts["English"], show_copy_button=True)
237
+ with gr.Row(variant="panel"):
238
+ with gr.Column(scale=1):
239
+ submit_btn = gr.Button(value="Generate", variant="primary")
240
+ clear_btn = gr.Button(value="Clear", variant="secondary")
241
+ input_text = gr.Textbox(lines=1, label="Prompt", value="Write a Nike style ad headline about the shame of being second best.", scale=3, show_copy_button=True)
242
  with gr.Accordion(label="Generation Configurations", open=False):
243
  max_new_tokens = gr.Slider(minimum=128, maximum=4096, value=512, label="Max new tokens", step=128)
244
  temperature = gr.Slider(minimum=0.0, maximum=1.0, value=0.7, label="Temperature", step=0.01)
245
  top_p = gr.Slider(minimum=0.0, maximum=1.0, value=0.97, label="Top_p", step=0.01)
246
  repetition_penalty = gr.Slider(minimum=0.1, maximum=2.0, value=1.1, label="Repetition Penalty", step=0.1)
247
 
248
+ gr.HTML("<h2>Check outputs</h2>")
 
 
 
 
249
  with gr.Row(variant="panel"):
250
  with gr.Column():
251
  chatbot_a = gr.Chatbot(label="Model A", show_copy_button=True, height=500)
252
  with gr.Column():
253
  chatbot_b = gr.Chatbot(label="Model B", show_copy_button=True, height=500)
254
+
255
+ gr.HTML("<h2>Vote!</h2>")
256
  with gr.Row(variant="panel"):
257
  better_bot = gr.Radio(["Bot A kicks ass!", "Bot B crushes it!", "It's a draw."], label="Rate the output!")
258