INNER CODE UNIT · Python

get_ui_initial_data

devnen/Kitten-TTS-Server · server.py:290

async def get_ui_initial_data():
    """
    Provides all necessary initial data for the UI to render,
    including configuration, file lists, presets, and model information.
    """
    logger.info("Request received for /api/ui/initial-data.")
    try:
        full_config = get_full_config_for_template()

        # Get model information for UI
        model_info = engine.get_model_info()
        model_registry = engine.get_model_registry()

        loaded_presets = []
        presets_file = ui_static_path / "presets.yaml"
        if presets_file.exists():
            with open(presets_file, "r", encoding="utf-8") as f:
                yaml_content = yaml.safe_load(f)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…