Spaces:
Running
Running
Download modules/api/impl/style_api.py from wffcyrus/ChatTTS-Forge: direct link, hf CLI and curl.
- Browser
- Download file 368 Bytes
-
https://huggingface.co/spaces/wffcyrus/ChatTTS-Forge/resolve/main/modules/api/impl/style_api.py
- Command line
-
hf download hf://spaces/wffcyrus/ChatTTS-Forge/modules/api/impl/style_api.py
-
curl -L -o style_api.py https://huggingface.co/spaces/wffcyrus/ChatTTS-Forge/resolve/main/modules/api/impl/style_api.py
368 Bytes
| from modules.data import styles_mgr | |
| from modules.api import utils as api_utils | |
| from modules.api.Api import APIManager | |
| async def list_styles(): | |
| return {"message": "ok", "data": styles_mgr.list_items()} | |
| async def create_style(): | |
| # TODO | |
| pass | |
| def setup(app: APIManager): | |
| app.get("/v1/styles/list", response_model=api_utils.BaseResponse)(list_styles) | |