Skip to content

Commit

Permalink
nemo_asr: fix readme and docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
nik committed Apr 10, 2024
1 parent 11aaede commit 270e8ba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions label_studio_ml/examples/nemo_asr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ It works with the `Audio Transcription` labeling interface from project `Setting

or any other labeling interface that combines `<Audio>` and `<TextArea>` elements.

> Warning: only use audio files hosted in public URLs, as the ML backend will download them to process.
> Warning: if you use files hosted in Label Studio (e.g. audio files directly uploaded via import dialog), you should provide `LABEL_STUDIO_URL` and `LABEL_STUDIO_API_KEY` environment variable to the ML backend.
## Running with Docker (Recommended)

Expand All @@ -35,7 +35,7 @@ $ curl http://localhost:9090/
{"status":"UP"}
```

3. Connect to the backend from Label Studio running on the same host: go to your project `Settings -> Machine Learning -> Add Model` and specify `http://localhost:9090` as a URL.
3. Connect to the backend from Label Studio running on the same host: go to your project `Settings -> Model -> Connect Model` and specify `http://localhost:9090` as a URL.


## Building from source (Advanced)
Expand All @@ -59,7 +59,7 @@ pip install -r requirements.txt
Then you can start the ML backend:

```bash
label-studio-ml start ./dir_with_your_model
label-studio-ml start ./nemo_asr
```

# Configuration
Expand All @@ -73,7 +73,9 @@ The following common parameters are available:
- `LOG_LEVEL` - set the log level for the model server
- `WORKERS` - specify the number of workers for the model server
- `THREADS` - specify the number of threads for the model server
- `LABEL_STUDIO_HOST`: The host of the Label Studio instance. Default is 'http://localhost:8080'.
- `LABEL_STUDIO_API_KEY`: The API key for the Label Studio instance.

# Customization

The ML backend can be customized by adding your own models and logic inside the `./dir_with_your_model` directory.
The ML backend can be customized by adding your own models and logic inside the `./nemo_asr/model.py`.
2 changes: 1 addition & 1 deletion label_studio_ml/examples/nemo_asr/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ services:
# Do not use 'localhost' as it does not work within Docker containers.
# Use prefix 'http://' or 'https://' for the URL always.
# Determine the actual IP using 'ifconfig' (Linux/Mac) or 'ipconfig' (Windows).
- LABEL_STUDIO_URL=
- LABEL_STUDIO_URL=http://localhost:8080
- LABEL_STUDIO_API_KEY=
ports:
- "9090:9090"
Expand Down

0 comments on commit 270e8ba

Please sign in to comment.