Matt commited on
Commit
fa7d51d
·
1 Parent(s): bf8ac05

Add default buttons

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -46,11 +46,16 @@ with gr.Blocks() as demo:
46
 
47
  with gr.Row():
48
  with gr.Column():
 
 
 
 
 
49
  template_in = gr.TextArea(value=default_template, lines=10, max_lines=30, label="Chat Template")
50
  conversation_in = gr.TextArea(value=demo_conversation, lines=6, label="Conversation")
51
  generation_prompt_check = gr.Checkbox(value=False, label="Add generation prompt")
52
  cleanup_whitespace_check = gr.Checkbox(value=True, label="Cleanup template whitespace")
53
- submit = gr.Button("Apply template")
54
  with gr.Column():
55
  formatted_out = gr.TextArea(label="Formatted conversation")
56
  code_snippet_out = gr.TextArea(label="Code snippet to create PR", lines=3, show_label=True, show_copy_button=True)
 
46
 
47
  with gr.Row():
48
  with gr.Column():
49
+ with gr.Row():
50
+ gr.Markdown("Default templates")
51
+ with gr.Row():
52
+ gr.Button("ChatML")
53
+ gr.Button("Zephyr")
54
  template_in = gr.TextArea(value=default_template, lines=10, max_lines=30, label="Chat Template")
55
  conversation_in = gr.TextArea(value=demo_conversation, lines=6, label="Conversation")
56
  generation_prompt_check = gr.Checkbox(value=False, label="Add generation prompt")
57
  cleanup_whitespace_check = gr.Checkbox(value=True, label="Cleanup template whitespace")
58
+ submit = gr.Button("Apply template", variant="primary")
59
  with gr.Column():
60
  formatted_out = gr.TextArea(label="Formatted conversation")
61
  code_snippet_out = gr.TextArea(label="Code snippet to create PR", lines=3, show_label=True, show_copy_button=True)