Download README.md from BlueShark1214/sr-01: direct link, hf CLI and curl.
- Browser
- Download file 2.37 kB
-
https://huggingface.co/BlueShark1214/sr-01/resolve/main/README.md
- Command line
-
hf download hf://BlueShark1214/sr-01/README.md
-
curl -L -o README.md https://huggingface.co/BlueShark1214/sr-01/resolve/main/README.md
Container Template for SoundsRight Subnet Miners
Miners in Bittensor's SoundsRight Subnet must containerize their models before uploading to HuggingFace. This repo serves as a template.
The branches DENOISING_16000HZ and DEREVERBERATION_16000HZ contain this template fitted with SGMSE+ for 16 kHz speech enhancement, and the branches DENOISING_48000HZ and DEREVERBERATION_48000HZ are fitted with SGMSE+ for 48 kHz speech enhancement for the denoising and dereverberation tasks. These are also helpful resources for how to incorporate your model.
The main branch contains a template for a container that will spin up an API to communicate with the validator. The following entrypoints cannot be altered:
/status/: Communicates API status/prepare/: Makes necessary preparations (downloading checkpoints, etc.) and initializes model/upload-audio/: Upload audio files, save to noisy audio directory/enhance/: Initialize model, enhance audio files, save to enhanced audio directory/download-enhanced/: Download enhanced audio files/reset/: Remove all existing audio files for another batch of enhancement
To add your own model to this template, there are a few things that a miner must do:
- Add the model files under the
modeldirectory. - Modify the
modelapi.preparemethod inapp/app.pywith necessary preparations to initialize your model. - Modify the
modelapi.enhancemethod inapp/app.pywith the logic your model uses to enhance audio. - Update
dependenciesinpyproject.tomlwith the dependencies used by your model. - If you have directories other than
appin your repository, be sure to modify theDockerfileaccordingly (reference line 12 in theDockerfilefor how to do this). - Cite your sources (if applicable).
For your model to be processed by validators, there are a few formatting requirements. Note that the template already has been formatted to fit these guidelines.
- API endpoints must as outlined above.
- Port must be 6500.
- Container must be configured to run as non-root user.
- Container is not reliant on having network access to function as intended.