There is a module called pipreqs which is for creating a requirements file.
pip install pipreqs
pipreqs /GitHub/FolderName
Add location to folder where python files are located. Pipreqs will create a requirements.txt file in the folder.
source
to share