MedAdapt-SAM-AI / app.py
viraj-421's picture
Upload folder using huggingface_hub
1c1956b verified
Raw History Blame Contribute Delete
509 Bytes
import os
import sys
# Add the streamlit_app directory to the system path
sys.path.append(os.path.join(os.path.dirname(__file__), "streamlit_app"))
if __name__ == '__main__':
from streamlit.web import cli as stcli
# Hugging Face Spaces automatically runs `streamlit run app.py`
# when the SDK is set to streamlit in the README.md.
# We will redefine the command to run our actual app file.
sys.argv = ["streamlit", "run", "streamlit_app/app.py"]
sys.exit(stcli.main())