Matt commited on
Commit
c078aee
1 Parent(s): 4784142
Files changed (1) hide show
  1. app.py +14 -15
app.py CHANGED
@@ -44,19 +44,18 @@ with gr.Blocks() as demo:
44
 
45
  gr.Markdown(description_text)
46
 
 
 
 
 
 
 
 
 
 
 
47
  with gr.Row():
48
  with gr.Column():
49
- with gr.Row():
50
- gr.Markdown("### Pick an existing template to start:")
51
- with gr.Row():
52
- gr.Button("ChatML")
53
- gr.Button("Zephyr")
54
- with gr.Row():
55
- gr.Button("LLaMA")
56
- gr.Button("Alpaca")
57
- with gr.Row():
58
- gr.Button("Vicuna")
59
- gr.Button("Something else")
60
  template_in = gr.TextArea(value=default_template, lines=10, max_lines=30, label="Chat Template")
61
  conversation_in = gr.TextArea(value=demo_conversation, lines=6, label="Conversation")
62
  generation_prompt_check = gr.Checkbox(value=False, label="Add generation prompt")
@@ -65,10 +64,10 @@ with gr.Blocks() as demo:
65
  with gr.Column():
66
  formatted_out = gr.TextArea(label="Formatted conversation")
67
  code_snippet_out = gr.TextArea(label="Code snippet to create PR", lines=3, show_label=True, show_copy_button=True)
68
- submit.click(fn=apply_chat_template,
69
- inputs=[template_in, conversation_in, generation_prompt_check, cleanup_whitespace_check],
70
- outputs=[formatted_out, code_snippet_out]
71
- )
72
 
73
  demo.launch()
74
 
 
44
 
45
  gr.Markdown(description_text)
46
 
47
+ with gr.Row():
48
+ gr.Markdown("### Pick an existing template to start:")
49
+ with gr.Row():
50
+ gr.Button("ChatML")
51
+ gr.Button("Zephyr")
52
+ gr.Button("LLaMA")
53
+ with gr.Row():
54
+ gr.Button("Alpaca")
55
+ gr.Button("Vicuna")
56
+ gr.Button("Something else")
57
  with gr.Row():
58
  with gr.Column():
 
 
 
 
 
 
 
 
 
 
 
59
  template_in = gr.TextArea(value=default_template, lines=10, max_lines=30, label="Chat Template")
60
  conversation_in = gr.TextArea(value=demo_conversation, lines=6, label="Conversation")
61
  generation_prompt_check = gr.Checkbox(value=False, label="Add generation prompt")
 
64
  with gr.Column():
65
  formatted_out = gr.TextArea(label="Formatted conversation")
66
  code_snippet_out = gr.TextArea(label="Code snippet to create PR", lines=3, show_label=True, show_copy_button=True)
67
+ submit.click(fn=apply_chat_template,
68
+ inputs=[template_in, conversation_in, generation_prompt_check, cleanup_whitespace_check],
69
+ outputs=[formatted_out, code_snippet_out]
70
+ )
71
 
72
  demo.launch()
73