Spaces:
Sleeping
Sleeping
Download API/main.py from jatinmehra/Image2Biomass-Prediction: direct link, hf CLI and curl.
- Browser
- Download file 420 Bytes
-
https://huggingface.co/spaces/jatinmehra/Image2Biomass-Prediction/resolve/main/API/main.py
- Command line
-
hf download hf://spaces/jatinmehra/Image2Biomass-Prediction/API/main.py
-
curl -L -o main.py https://huggingface.co/spaces/jatinmehra/Image2Biomass-Prediction/resolve/main/API/main.py
420 Bytes
| """Adapter module so Uvicorn can import the ASGI app as `API.main:app`. | |
| This simply re-exports the `app` defined in the project's top-level `main.py`. | |
| """ | |
| try: | |
| from main import app # project root `main.py` | |
| except Exception: | |
| # Fallback: add project root to path then import | |
| import os | |
| import sys | |
| sys.path.append(os.path.dirname(os.path.dirname(__file__))) | |
| from main import app | |
| __all__ = ["app"] | |