I’m glad I was able to help you! 
If you’re using pip locally you should look at using a virtual environment. This will give you a way of installing specific packages and their versions for a given project you’re working on so you can avoid conflicting versions, etc.
Here’s a pretty comprehensive overview of what a virtual environment is.
Here’s a guide to set up a virtual environment on your machine using virtualenv
There are a number of different ways to create and manage virtual environments. I know Jeremy recommends anaconda/mamba.
Here’s an answer on stack overflow that compares different virtualenv managers.
Edit
I forgot to mention that when you install a package e.g. Gradio
you’re also installing the dependencies of that package as well. These are called transitive dependencies. Below is part of the output of running pip install gradio
Installing collected packages: pydub, ffmpy, websockets, uc-micro-py, semantic-version, python-multipart, orjson, multidict, h11, frozenlist, async-timeout, aiofiles, yarl, uvicorn, starlette, mdit-py-plugins, linkify-it-py, huggingface-hub, httpcore, aiosignal, httpx, fastapi, aiohttp, gradio-client, gradio
This is one of the reasons your requirements.txt
file is so large even if you use a virtual environment. 