Spaces:
Build error
Build error
Commit ·
b2c6d30
1
Parent(s): 12460c2
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,5 +11,5 @@ text = st.text_input("Enter the starting text:", "Replace me by any text you'd l
|
|
| 11 |
if st.button("Generate"):
|
| 12 |
encoded_input = tokenizer(text, return_tensors='pt', padding=False, truncation=False)
|
| 13 |
output = model(**encoded_input)
|
| 14 |
-
generated_text = output
|
| 15 |
st.write(generated_text)
|
|
|
|
| 11 |
if st.button("Generate"):
|
| 12 |
encoded_input = tokenizer(text, return_tensors='pt', padding=False, truncation=False)
|
| 13 |
output = model(**encoded_input)
|
| 14 |
+
generated_text = tokenizer.decode(torch.argmax(output[0], dim=1), skip_special_tokens=True)
|
| 15 |
st.write(generated_text)
|