Some logic for favorites in main.py and started the workflow for favoriting