Manjushri commited on
Commit
42a6918
1 Parent(s): 8ccdc3a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -4,8 +4,7 @@ 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 = 1
8
- pad_token_id = eos_token_id=0 #for open-end generation.
9
 
10
  def chat(Prompt):
11
  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':'eos_token_id':0}
 
8
 
9
  def chat(Prompt):
10
  input_ids = tokenizer(Prompt, return_tensors="pt").input_ids