betajuned commited on
Commit
a7ffbe7
1 Parent(s): a9ed3bb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -8,15 +8,14 @@ description = "A State-of-the-Art Large-scale Pretrained Response generation mod
8
  examples = [["How are you?"]]
9
 
10
 
11
- tokenizer = AutoTokenizer.from_pretrained("betajuned/GPT-2_Kombinasi4", padding_side='left')
12
  model = AutoModelForCausalLM.from_pretrained("betajuned/GPT-2_Kombinasi4")
13
 
14
- tokenizer.add_special_tokens({'pad_token': '[PAD]'})
15
 
16
  def predict(input, history=[]):
17
  # tokenize the new input sentence
18
  new_user_input_ids = tokenizer.encode(
19
- input + tokenizer.eos_token, return_tensors="pt", padding=True, truncation=True
20
  )
21
 
22
  # append the new user input tokens to the chat history
 
8
  examples = [["How are you?"]]
9
 
10
 
11
+ tokenizer = AutoTokenizer.from_pretrained("betajuned/GPT-2_Kombinasi4")
12
  model = AutoModelForCausalLM.from_pretrained("betajuned/GPT-2_Kombinasi4")
13
 
 
14
 
15
  def predict(input, history=[]):
16
  # tokenize the new input sentence
17
  new_user_input_ids = tokenizer.encode(
18
+ input + tokenizer.eos_token, return_tensors="pt"
19
  )
20
 
21
  # append the new user input tokens to the chat history