mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-04-06 15:13:38 +00:00
Address copilot feedback
This commit is contained in:
parent
24fdcc52b3
commit
04213dff14
6 changed files with 14 additions and 6 deletions
|
|
@ -431,7 +431,8 @@ def load_instruction_template(template):
|
|||
else:
|
||||
return ''
|
||||
|
||||
file_contents = open(filepath, 'r', encoding='utf-8').read()
|
||||
with open(filepath, 'r', encoding='utf-8') as f:
|
||||
file_contents = f.read()
|
||||
data = yaml.safe_load(file_contents)
|
||||
if 'instruction_template' in data:
|
||||
return data['instruction_template']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue