Create main.py

updated flow