Nvidia has agreed to buy Hugging Face, a repository of open-source AI models, according to a report.