Jaehan commited on
Commit
0b21f94
1 Parent(s): 0cc3546

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -7,7 +7,7 @@ tokenizer = GPT2Tokenizer.from_pretrained(model_name)
7
 
8
  def generate(text):
9
  token_ids = tokenizer.encode(text, return_tensors="pt")
10
- gpt2_tensors = model.generate(token_ids, max_length=200)
11
 
12
  #response= gpt2_tensors
13
  response = ""
 
7
 
8
  def generate(text):
9
  token_ids = tokenizer.encode(text, return_tensors="pt")
10
+ gpt2_tensors = model.generate(token_ids, max_length=200, no_repeat_ngram_size=True)
11
 
12
  #response= gpt2_tensors
13
  response = ""