This commit is contained in:
2026-03-28 10:05:59 -03:00
parent e46bbc419c
commit d0707333fd
12 changed files with 381 additions and 120 deletions

View File

@@ -64,6 +64,22 @@ def list_profiles():
return [{"name": name} for name in _PROFILES]
@router.get("/config/profiles/{profile_name}/pipeline")
def get_pipeline_config(profile_name: str):
"""Return the pipeline composition for a profile."""
from detect.profiles import get_profile
from fastapi import HTTPException
from dataclasses import asdict
try:
profile = get_profile(profile_name)
except ValueError:
raise HTTPException(status_code=404, detail=f"Unknown profile: {profile_name}")
config = profile.pipeline_config()
return asdict(config)
@router.get("/config/stages", response_model=list[StageConfigInfo])
def list_stage_configs():
"""Return the stage palette with config field metadata for the editor."""

View File

@@ -88,7 +88,7 @@ def run_pipeline(req: RunRequest):
log_level=req.log_level,
)
pipeline = get_pipeline(checkpoint=req.checkpoint)
pipeline = get_pipeline(checkpoint=req.checkpoint, profile_name=req.profile_name)
initial_state = DetectState(
video_path=local_path,