Fix bug in upload + docs nit (#981)

* fix bug in upload + docs nit

* nit
This commit is contained in:
Awni Hannun
2024-09-07 14:46:57 -07:00
committed by GitHub
parent c3e3411756
commit 6c2369e4b9
2 changed files with 8 additions and 24 deletions

View File

@@ -581,7 +581,7 @@ def upload_to_hub(path: str, upload_repo: str, hf_path: str):
prompt="hello"
if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
messages = [{"role": "user", "content": prompt}]
messages = [{{"role": "user", "content": prompt}}]
prompt = tokenizer.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True
)