Manjushri commited on
Commit
651bf26
1 Parent(s): 42a6918

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -4,7 +4,8 @@ import gradio as gr
4
  tokenizer = AutoTokenizer.from_pretrained("microsoft/lts-gpt2-sm")
5
  model = AutoModelForCausalLM.from_pretrained("microsoft/lts-gpt2-sm", subfolder="gpt2_6c6e63116ff74ba444ff5a08cef54380073ebea3")
6
 
7
- attention_mask = {'pad_token_id':'eos_token_id':0}
 
8
 
9
  def chat(Prompt):
10
  input_ids = tokenizer(Prompt, return_tensors="pt").input_ids
 
4
  tokenizer = AutoTokenizer.from_pretrained("microsoft/lts-gpt2-sm")
5
  model = AutoModelForCausalLM.from_pretrained("microsoft/lts-gpt2-sm", subfolder="gpt2_6c6e63116ff74ba444ff5a08cef54380073ebea3")
6
 
7
+ attention_mask = {'pad_token_id':1,
8
+ 'eos_token_id':0}
9
 
10
  def chat(Prompt):
11
  input_ids = tokenizer(Prompt, return_tensors="pt").input_ids