Spaces:
Runtime error
Runtime error
Download app.py from viraj-421/MedAdapt-SAM-AI: direct link, hf CLI and curl.
- Browser
- Download file 509 Bytes
-
https://huggingface.co/spaces/viraj-421/MedAdapt-SAM-AI/resolve/main/app.py
- Command line
-
hf download hf://spaces/viraj-421/MedAdapt-SAM-AI/app.py
-
curl -L -o app.py https://huggingface.co/spaces/viraj-421/MedAdapt-SAM-AI/resolve/main/app.py
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()) | |