File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ def format_variants():
5656 if 'default' not in variants :
5757 raise Exception (f'Please specify a chat template variant (one of { format_variants ()} )' )
5858 variant = 'default'
59- print (f'Note: picked "default" chat template variant (out of { format_variants ()} )' , file = sys . stderr )
59+ sys . stderr . write (f'Note: picked "default" chat template variant (out of { format_variants ()} )\n ' )
6060 elif variant not in variants :
6161 raise Exception (f"Variant { variant } not found in chat template (found { format_variants ()} )" )
6262
@@ -70,7 +70,7 @@ def main(args):
7070 variant = None if len (args ) < 2 else args [1 ]
7171
7272 template = get_hf_chat_template (model_id , variant )
73- print (template , end = None )
73+ sys . stdout . write (template )
7474
7575
7676if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments