irfantea commited on
Commit
1089abe
1 Parent(s): 987ad3f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -22,6 +22,6 @@ st.info("Max generated sentence: 100 words")
22
  if (st.button("Generate")):
23
  input_ids = tokenizer.encode(sentence, return_tensors='pt').to(device)
24
  paragraph_generated = model.generate(input_ids, max_length=100, num_beams=5, no_repeat_ngram_size=2, early_stopping=True).to(device)
25
- text = tokenizer.decode(paragraph_generated[0], skip_special_tokens=True).to(device)
26
 
27
  st.write(text)
 
22
  if (st.button("Generate")):
23
  input_ids = tokenizer.encode(sentence, return_tensors='pt').to(device)
24
  paragraph_generated = model.generate(input_ids, max_length=100, num_beams=5, no_repeat_ngram_size=2, early_stopping=True).to(device)
25
+ text = tokenizer.decode(paragraph_generated[0], skip_special_tokens=True)
26
 
27
  st.write(text)