| """Hugging Face Space entrypoint.""" | |
| from pathlib import Path | |
| import sys | |
| ROOT = Path(__file__).resolve().parent | |
| SRC = ROOT / "src" | |
| if str(SRC) not in sys.path: | |
| sys.path.insert(0, str(SRC)) | |
| from midnight_static.gradio_app import FORCE_LIGHT_THEME_HEAD, create_radio_app | |
| demo = create_radio_app() | |
| if __name__ == "__main__": | |
| # `head` forces Gradio's light mode (the radio is designed for it); it lives | |
| # on launch() in Gradio 6, not the Blocks constructor. | |
| demo.launch(head=FORCE_LIGHT_THEME_HEAD) | |