Update app.py
Browse files
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':
|
|
|
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
|