ImportError: cannot import name 'CommitInfo' from 'huggingface_hub'

I am encountering an ImportError when running a Python script that imports CommitInfo from the huggingface_hub package. The error message is as follows:

ImportError: cannot import name 'CommitInfo' from 'huggingface_hub' (/home/user/anaconda3/envs/kg/lib/python3.9/site-packages/huggingface_hub/__init__.py)

Full description here - https://stackoverflow.com/q/78734243/2051572