Nvidia beats second-quarter expectations boosted by demand for AI chips