import streamlit.web.cli as stcli import os, sys # pip install protobuf==3.20.0 # pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu117 nope # pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu118 def resolve_path(path): resolved_path = os.path.abspath(os.path.join(os.getcwd(), path)) return resolved_path if __name__ == "__main__": dir_home = os.path.dirname(__file__) # pip install protobuf==3.20.0 sys.argv = [ "streamlit", "run", resolve_path(os.path.join(dir_home,"app.py")), # resolve_path(os.path.join(dir_home,"vouchervision", "VoucherVision_GUI.py")), "--global.developmentMode=false", # "--server.port=8545", "--server.port=8546", # Toggle below for HF vs Local # "--is_hf=1", # "--is_hf=0", ] sys.exit(stcli.main())