MCPcopy Create free account
hub / github.com/SunOner/sunone_aimbot / api_export

Function api_export

helper_api.py:1269–1278  ·  view source on GitHub ↗
(payload: ExportRequest)

Source from the content-addressed store, hash-verified

1267
1268@app.post("/api/export")
1269def api_export(payload: ExportRequest) -> dict[str, Any]:
1270 from ultralytics import YOLO
1271 model_path = _export_model_path(payload.model_name)
1272 params = _export_params(payload)
1273 try:
1274 exported = YOLO(str(model_path)).export(**params)
1275 except Exception as exc:
1276 raise HTTPException(status_code=500, detail=f"Export failed: {exc}") from exc
1277 _invalidate_system_meta_cache()
1278 return {"ok": True, "message": "Model exported successfully.", "path": str(exported)}
1279
1280
1281@app.post("/api/export/stream")

Callers

nothing calls this directly

Calls 3

_export_model_pathFunction · 0.85
_export_paramsFunction · 0.85

Tested by

no test coverage detected