Since the developers changed the path again and the other answers don't work anymore:
if __name__ == "__main__":
import subprocess
from streamlit import runtime
if runtime.exists():
main()
else:
process = subprocess.Popen(["streamlit", "run", "src/main.py"])