Update app.py
Browse files111 unmodified lines11211311411511611729 unmodified lines147148149150111 unmodified lineswifi = "S铆" if "wifi\s*:\s*s铆" in limpiar_texto(texto) else "No"servicios = obtener_servicios(texto)return f"""馃彔 Nombre: {nombre}馃搷 Direcci贸n: {direccion}馃摓 Tel茅fono: {telefono}29 unmodified linespreguntar_btn.click(actualizar_chat, inputs=[chat_historial, pregunta_input], outputs=[chat_historial, pregunta_input])if __name__ == "__main__":iface.launch()111 unmodified lines11211311411511611711811912012112229 unmodified lines152153154155111 unmodified lineswifi = "S铆" if "wifi\s*:\s*s铆" in limpiar_texto(texto) else "No"servicios = obtener_servicios(texto)# Si el nombre sigue siendo "No especificado", intentamos usar el primer bloque de textoif nombre == "No especificado":nombre = texto.split("\n")[0].strip()print(f"Nombre extra铆do del primer bloque: {nombre}")return f"""馃彔 Nombre: {nombre}馃搷 Direcci贸n: {direccion}馃摓 Tel茅fono: {telefono}29 unmodified linespreguntar_btn.click(actualizar_chat, inputs=[chat_historial, pregunta_input], outputs=[chat_historial, pregunta_input])if __name__ == "__main__":iface.launch()
app.py+6-1