CellTriage / app /__init__.py
Sarvarbek13's picture
CellTriage QC operator console - inference only, CPU-bound classical ML
749bffa verified
Raw
History Blame Contribute Delete
675 Bytes
"""Operator console package.
WHY THIS FILE EXISTS, given that namespace packages usually make it optional.
HuggingFace Spaces launches the app as a script (`python app/app.py`), which
places `app/` itself on `sys.path`. Without an `__init__.py`, `app` at the
repository root is only a NAMESPACE package, and Python resolves a regular
module found later on the path -- `app/app.py` -- in preference to it. `import
app` then binds to the module that is still executing, and `from app import
panels` fails with a circular import.
Making this a regular package means the repository-root `app` wins immediately,
so script launch and `python -m app.app` resolve identically.
"""