Matt commited on
Commit
95dfd9b
1 Parent(s): 434878e
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -5,7 +5,7 @@ import json
5
  tokenizer = AutoTokenizer.from_pretrained("HuggingFaceH4/zephyr-7b-beta")
6
 
7
  demo_conversation = """[
8
- {"role": "system": "content": "You are a helpful chatbot."},
9
  {"role": "user", "content": "Hi there!"},
10
  {"role": "assistant", "content": "Hello, human!"},
11
  {"role": "user", "content": "Can I ask a question?"}
@@ -18,9 +18,9 @@ default_template = """{% for message in messages %}
18
  {{ "<|im_start|>assistant\\n" }}
19
  {% endif %}"""
20
 
21
- description_text = """This space is a helper app for writing [Chat Templates](https://huggingface.co/docs/transformers/main/en/chat_templating). Please see the linked
22
- documentation for more information! When you're happy with the outputs from your template, you can use the code block at the end to create a PR to add your template to a
23
- model"""
24
 
25
  def apply_chat_template(template, test_conversation, add_generation_prompt, cleanup_whitespace):
26
  if cleanup_whitespace:
 
5
  tokenizer = AutoTokenizer.from_pretrained("HuggingFaceH4/zephyr-7b-beta")
6
 
7
  demo_conversation = """[
8
+ {"role": "system", "content": "You are a helpful chatbot."},
9
  {"role": "user", "content": "Hi there!"},
10
  {"role": "assistant", "content": "Hello, human!"},
11
  {"role": "user", "content": "Can I ask a question?"}
 
18
  {{ "<|im_start|>assistant\\n" }}
19
  {% endif %}"""
20
 
21
+ description_text = """###This space is a helper app for writing [Chat Templates](https://huggingface.co/docs/transformers/main/en/chat_templating).
22
+
23
+ ###When you're happy with the outputs from your template, you can use the code block at the end to create a PR to add your template to a model"""
24
 
25
  def apply_chat_template(template, test_conversation, add_generation_prompt, cleanup_whitespace):
26
  if cleanup_whitespace: