(
data: schemas.CustomModeGenerateParam, token: str = Depends(get_token)
)
| 28 | |
| 29 | @app.post("/generate") |
| 30 | async def generate( |
| 31 | data: schemas.CustomModeGenerateParam, token: str = Depends(get_token) |
| 32 | ): |
| 33 | try: |
| 34 | resp = await generate_music(data.dict(), token) |
| 35 | return resp |
| 36 | except Exception as e: |
| 37 | raise HTTPException( |
| 38 | detail=str(e), status_code=status.HTTP_500_INTERNAL_SERVER_ERROR |
| 39 | ) |
| 40 | |
| 41 | |
| 42 | @app.post("/generate/description-mode") |
nothing calls this directly
no test coverage detected