Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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)
|
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)
|