Nvidia Corp. has agreed to acquire artificial intelligence startup Hugging Face in a transaction valued at about $13 billion.