JeCabrera commited on
Commit
c2ec4b6
·
verified ·
1 Parent(s): 9b8d7fa

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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
- # Procesa el texto caracter por caracter
173
- for char in chunk.text:
174
- full_response += char
175
- time.sleep(0.02) # Velocidad ajustada para mejor legibilidad
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