import subprocess
import sys
from pathlib import Path

def main():
    app_file = str(Path(__file__).resolve().parent) + "/streamlit_app.py"
    command = [sys.executable, "-m", "streamlit", "run", app_file]
    subprocess.run(command)
    print(app_file)

if __name__ == "__main__": # doesn't run at import time, only when called
    main()