MCPcopy Create free account
hub / github.com/ace-step/ACE-Step / startup_event

Function startup_event

trainer-api.py:217–221  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

215
216@app.on_event("startup")
217async def startup_event():
218 global model
219 checkpoint_dir = os.getenv("CHECKPOINT_DIR", "./checkpoints")
220 model = InferencePipeline(checkpoint_dir=checkpoint_dir)
221 logger.info("Model loaded successfully")
222
223@app.post("/generate", response_model=TextToMusicResponse)
224async def generate_music(request: TextToMusicRequest):

Callers

nothing calls this directly

Calls 1

InferencePipelineClass · 0.85

Tested by

no test coverage detected