Update pages/gpt.py
Browse files- pages/gpt.py +4 -1
pages/gpt.py
CHANGED
@@ -48,7 +48,10 @@ if st.button('**Generate text**'):
|
|
48 |
).cpu().numpy()
|
49 |
st.write('**_Результат_** 👇')
|
50 |
for i, out_ in enumerate(out):
|
51 |
-
|
|
|
|
|
|
|
52 |
with st.expander(f'Текст {i+1}:'):
|
53 |
st.write(textwrap.fill(tokenizer.decode(out_), 100))
|
54 |
st.image("pict/wow.png")
|
|
|
48 |
).cpu().numpy()
|
49 |
st.write('**_Результат_** 👇')
|
50 |
for i, out_ in enumerate(out):
|
51 |
+
audio_file = open('pict/pole-chudes-priz.mp3', 'rb')
|
52 |
+
audio_bytes = audio_file.read()
|
53 |
+
st.audio(audio_bytes, format='audio/mp3')
|
54 |
+
|
55 |
with st.expander(f'Текст {i+1}:'):
|
56 |
st.write(textwrap.fill(tokenizer.decode(out_), 100))
|
57 |
st.image("pict/wow.png")
|