in the FS root path has already had main.py file you could modify it. when you select the app mode(purple) main.py will be exec.
if you are use UIFlow, you need to download the program, not just exec it. then it will auto setting this program for auto-start running.
if still not work, pls check the serial log