Company's traditional EV business has declined for the past two years

The automaker said demand for its vehicles has rebounded from recent declines.

Tesla reported an uptick in quarterly revenue and profit, but the costs of pivoting to an AI future are starting to add up.