Pinterest hopes that investing in more advanced AI capabilities for merchants and advertisers will help it make up lost ground on revenue.