Deployment and Instrumentation¶
To run locally:¶
Set up Environment Variables¶
- Create a.env
file using nano .env
command or using vim
and add these keys and save the file.
Run Application¶
-
Run this command to launch the endpoint:
-
Test it out by accessing the Swagger UI at
http://localhost:8000/docs
and uploading either an .mp3 file or a .wav file and a task eithertranscribe
ortranslate
.
To deploy to a production environment:¶
Set up Environment Variables¶
-
Navigate to
src/deployment
and set up environment variables by creating a.env
file with the following content: -
MODEL_NAME
: Name of the fine-tuned model to use in your Hugging Face Hub repository. -
HUGGINGFACE_TOKEN
: Your Hugging Face authentication token for write access. -
Top deploy a docker container running the application and monitoring endpoints.
http://localhost:8000
- Application./docs
for Swagger UI.http://localhost:3000
- Grafana dashboard.http://localhost:9090
- Prometheus dashboard