Spaces:
Sleeping
Sleeping
| from __future__ import annotations | |
| from .auth import make_auth_fn, parse_users | |
| from .config import load_settings | |
| from .factory import build_service | |
| from .ui import build_app | |
| def main() -> None: | |
| settings = load_settings() | |
| service = build_service(settings) | |
| users = parse_users(settings.app_users_raw) | |
| demo = build_app(service, title=settings.title) | |
| auth = make_auth_fn(users) if users else None | |
| # auth gates the whole app; never use share=True (it would bypass the gate) | |
| demo.queue(max_size=16).launch(auth=auth, server_name="0.0.0.0", server_port=7860, share=False) | |
| if __name__ == "__main__": | |
| main() | |