lliu01 commited on
Commit
4ff447b
·
verified ·
1 Parent(s): 7c3883d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -72,6 +72,10 @@ sys_prompt = "FortiOS firewall configuration in CLI.\n"
72
  if __name__ == "__main__":
73
  args = parse_args()
74
  tokenizer = AutoTokenizer.from_pretrained("lliu01/fortios")
 
 
 
 
75
  model = AutoModelForCausalLM.from_pretrained(
76
  "lliu01/fortios",
77
  torch_dtype=torch.bfloat16,
 
72
  if __name__ == "__main__":
73
  args = parse_args()
74
  tokenizer = AutoTokenizer.from_pretrained("lliu01/fortios")
75
+ if not tokenizer.pad_token:
76
+ tokenizer.pad_token = tokenizer.eos_token
77
+ print(f"The tokenizer.pad_token set as a {tokenizer.eos_token}")
78
+
79
  model = AutoModelForCausalLM.from_pretrained(
80
  "lliu01/fortios",
81
  torch_dtype=torch.bfloat16,