Skip to content

Commit

Permalink
Fix issue with HF Model upload tutorial (NVIDIA#5359) (NVIDIA#5360)
Browse files Browse the repository at this point in the history
* Add Gradio App to ASR Docs (NVIDIA#5270)

Signed-off-by: smajumdar <[email protected]>

Signed-off-by: smajumdar <[email protected]>
(cherry picked from commit e4b6a38)

* Fix issue with normalized config for dataset name

Signed-off-by: smajumdar <[email protected]>

Signed-off-by: smajumdar <[email protected]>

Signed-off-by: smajumdar <[email protected]>
Co-authored-by: Somshubra Majumdar <[email protected]>
Signed-off-by: Vladimir Bataev <[email protected]>
  • Loading branch information
2 people authored and artbataev committed Nov 9, 2022
1 parent 9dc399e commit 04d2912
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions tutorials/Publish_NeMo_Model_On_Hugging_Face_Hub.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,7 @@
{
"cell_type": "code",
"source": [
"# Replace all spaces with `-`\n",
"DATASETS = [\n",
" \"librispeech_asr\",\n",
" \"mozilla-foundation/common_voice_7_0\",\n",
Expand All @@ -466,11 +467,11 @@
" \"Switchboard-1\",\n",
" \"WSJ-0\",\n",
" \"WSJ-1\",\n",
" \"National Singapore Corpus Part 1\",\n",
" \"National Singapore Corpus Part 6\",\n",
" \"VoxPopuli (EN)\",\n",
" \"Europarl-ASR (EN)\",\n",
" \"Multilingual LibriSpeech (2000 hours)\",\n",
" \"National-Singapore-Corpus-Part-1\",\n",
" \"National-Singapore-Corpus-Part-6\",\n",
" \"VoxPopuli-(EN)\",\n",
" \"Europarl-ASR-(EN)\",\n",
" \"Multilingual-LibriSpeech-(2000-hours)\",\n",
"]"
],
"metadata": {
Expand Down Expand Up @@ -520,9 +521,14 @@
"config = OmegaConf.structured(config)\n",
"\n",
"with open_dict(config):\n",
" # Update `model_index` to `model-index`\n",
" model_index = config.pop('model_index')\n",
" config['model-index'] = model_index\n",
"\n",
" # Replace all spaces with `-` in datasets\n",
" normalized_datasets = [ds_name.replace(\" \", \"-\") for ds_name in config['datasets']]\n",
" config['datasets'] = OmegaConf.create(normalized_datasets)\n",
"\n",
"print(OmegaConf.to_yaml(config))"
],
"metadata": {
Expand Down

0 comments on commit 04d2912

Please sign in to comment.