| """HF Spaces (ZeroGPU) entry point: Peitho 1.5B v6 German voice demo. | |
| Background: the stock LFM2.5-Audio-1.5B base model is English-only for | |
| speech-to-speech (see https://huggingface.co/LiquidAI/LFM2.5-Audio-1.5B — | |
| "Supported languages: English"). Our v6 fine-tune is what teaches it German | |
| audio output. A short A/B with the unmodified base model produced garbled | |
| German + robotic audio — confirming the fine-tune is essential. | |
| Model loading + the German v6 overlay live in `peitho_model.py`, which is | |
| written to be boot-safe on ZeroGPU (no CUDA warmup at import). This entry | |
| point just imports the model, then launches the chat demo. | |
| """ | |
| from __future__ import annotations | |
| import sys | |
| from pathlib import Path | |
| sys.path.insert(0, str(Path(__file__).parent)) | |
| def main() -> None: | |
| import peitho_model # noqa: F401 # triggers load + v6 overlay (boot-safe) | |
| print("Importing chat demo and launching...") | |
| import chat as chat_mod | |
| chat_mod.demo.launch() | |
| if __name__ == "__main__": | |
| main() | |