Spaces:
Running
Running
Upload app.py
Browse files
app.py
CHANGED
@@ -169,10 +169,10 @@ if prompt := st.chat_input('¿En qué puedo ayudarte hoy?'): # Mensaje más ami
|
|
169 |
|
170 |
# Streams in a chunk at a time
|
171 |
for chunk in response:
|
172 |
-
#
|
173 |
-
for
|
174 |
-
full_response +=
|
175 |
-
time.sleep(0.
|
176 |
# Rewrites with a cursor at end
|
177 |
message_placeholder.write(full_response + '▌')
|
178 |
|
|
|
169 |
|
170 |
# Streams in a chunk at a time
|
171 |
for chunk in response:
|
172 |
+
# Simulate stream of chunk
|
173 |
+
for word in chunk.text.split(' '):
|
174 |
+
full_response += word + ' '
|
175 |
+
time.sleep(0.1) # Velocidad ajustada para mejor legibilidad
|
176 |
# Rewrites with a cursor at end
|
177 |
message_placeholder.write(full_response + '▌')
|
178 |
|