We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 09aaf4f commit 5137da7Copy full SHA for 5137da7
scripts/get_chat_template.py
@@ -21,7 +21,7 @@ def get_chat_template(model_id, variant=None):
21
# Use huggingface_hub library if available.
22
# Allows access to gated models if the user has access and ran `huggingface-cli login`.
23
from huggingface_hub import hf_hub_download
24
- with open(hf_hub_download(repo_id=model_id, filename="tokenizer_config.json")) as f:
+ with open(hf_hub_download(repo_id=model_id, filename="tokenizer_config.json"), encoding="utf-8") as f:
25
config_str = f.read()
26
except ImportError:
27
import requests
0 commit comments