Hi guys,
So I have my main file with the code that I want to run (called main.py) which would look like something as follows:
import streamlit

def main():
    # do stuff here


if __name__ == "__main__":
    main()

and then another python file (run_streamlit.py) :

import subprocess
import other libraries that I use in main.py
subprocess.call(‘streamlit run main.py’)

And then I followed the tutorial which I linked to above and I believe called it on run_streamlit.py. Let me know if that worked out for you!