Skip to content

Deployment and Instrumentation

To run locally:

git clone https://github.com/KevKibe/African-Whisper.git

Set up Environment Variables

cd src/deployment
- Create a .env file using nano .env command or using vim and add these keys and save the file.
MODEL_NAME = "your-finetuned-model"
HUGGINGFACE_TOKEN = "huggingface-token"

Run Application

  • Run this command to launch the endpoint:

    make up
    

  • 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 either transcribe or translate.

To deploy to a production environment:

Set up Environment Variables

  1. Navigate to src/deployment and set up environment variables by creating a .env file with the following content:

    MODEL_NAME = "your-model-name"
    HUGGINGFACE_TOKEN = "your-token"
    
  2. MODEL_NAME: Name of the fine-tuned model to use in your Hugging Face Hub repository.

  3. HUGGINGFACE_TOKEN: Your Hugging Face authentication token for write access.

  4. Top deploy a docker container running the application and monitoring endpoints.

    make deploy
    

  5. http://localhost:8000 - Application. /docs for Swagger UI.
  6. http://localhost:3000 - Grafana dashboard.
  7. http://localhost:9090 - Prometheus dashboard