Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -62,7 +62,7 @@ def generate(user_input, history, temperature=None, max_new_tokens=512, top_p=0.
|
|
62 |
|
63 |
audio_file_path = text_to_speech(response, speed=1.3)
|
64 |
audio_file = open(audio_file_path, 'rb')
|
65 |
-
audio_bytes =
|
66 |
|
67 |
return response, audio_bytes
|
68 |
|
@@ -76,7 +76,7 @@ if st.session_state.history:
|
|
76 |
else:
|
77 |
output, audio_bytes = "", ""
|
78 |
|
79 |
-
st.text_area("Salida del Chatbot", value=output, height=
|
80 |
user_input = st.text_input(label="Ingresa tu mensaje", value="")
|
81 |
|
82 |
if user_input:
|
|
|
62 |
|
63 |
audio_file_path = text_to_speech(response, speed=1.3)
|
64 |
audio_file = open(audio_file_path, 'rb')
|
65 |
+
audio_bytes = io.BytesIO(open(audio_file_path, 'rb').read())
|
66 |
|
67 |
return response, audio_bytes
|
68 |
|
|
|
76 |
else:
|
77 |
output, audio_bytes = "", ""
|
78 |
|
79 |
+
st.text_area("Salida del Chatbot", value=output, max-height=500, max_chars=600, key="output_text", disabled=True)
|
80 |
user_input = st.text_input(label="Ingresa tu mensaje", value="")
|
81 |
|
82 |
if user_input:
|