Mapu25 commited on
Commit
51d4c19
verified
1 Parent(s): c9386eb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -160,8 +160,8 @@ def dividir_intenciones(texto):
160
 
161
  return [texto]
162
  def responder(mensaje, historial):
 
163
  mensaje = mensaje.lower().strip()
164
-
165
  partes = dividir_intenciones(mensaje) #
166
 
167
  saludo = ""
@@ -221,7 +221,16 @@ Casa Lemaitre: Lunes a jueves: 7am - 5pm / Viernes: 7am - 6pm / S谩bado: 8am - 2
221
  馃憠 [Ver video](https://www.youtube.com/watch?v=aMJm7gFbCJw&t=1s)
222
 
223
  """
 
 
 
 
224
  for parte in partes:
 
 
 
 
 
225
 
226
  # 馃摉 RENOVACI脫N
227
  if any(p in parte for p in ["renov", "renuevo", "renovar", "renovaci贸n", "renovacion"]):
 
160
 
161
  return [texto]
162
  def responder(mensaje, historial):
163
+
164
  mensaje = mensaje.lower().strip()
 
165
  partes = dividir_intenciones(mensaje) #
166
 
167
  saludo = ""
 
221
  馃憠 [Ver video](https://www.youtube.com/watch?v=aMJm7gFbCJw&t=1s)
222
 
223
  """
224
+ mensaje = mensaje.lower().replace(",", " ").strip()
225
+ partes = dividir_intenciones(mensaje)
226
+
227
+ # 馃攣 PROCESAR CADA PARTE
228
  for parte in partes:
229
+ parte = parte.strip()
230
+
231
+ # 馃毇 IGNORAR BASURA
232
+ if not parte or len(parte) < 3:
233
+ continue
234
 
235
  # 馃摉 RENOVACI脫N
236
  if any(p in parte for p in ["renov", "renuevo", "renovar", "renovaci贸n", "renovacion"]):