Tonic commited on
Commit
cb71bf6
1 Parent(s): b9225bb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -7,10 +7,13 @@ description = "A State-of-the-Art Large-scale Pretrained Response generation mod
7
  examples = [["How are you?"]]
8
 
9
  # Set the padding token to be used and initialize the model
10
- tokenizer = AutoTokenizer.from_pretrained("microsoft/DialoGPT-medium")
11
- model = AutoModelForCausalLM.from_pretrained("microsoft/DialoGPT-medium")
12
  tokenizer.add_special_tokens({'pad_token': '[EOS]'})
13
  tokenizer.pad_token = tokenizer.eos_token
 
 
 
14
 
15
  #predict
16
  def predict(input, history=[]):
 
7
  examples = [["How are you?"]]
8
 
9
  # Set the padding token to be used and initialize the model
10
+ tokenizer = AutoTokenizer.from_pretrained("microsoft/DialoGPT-medium")
11
+ tokenizer.padding_side = 'left'
12
  tokenizer.add_special_tokens({'pad_token': '[EOS]'})
13
  tokenizer.pad_token = tokenizer.eos_token
14
+
15
+ # Model
16
+ model = AutoModelForCausalLM.from_pretrained("microsoft/DialoGPT-medium")
17
 
18
  #predict
19
  def predict(input, history=[]):