From 2d62a6381fc113272fec28ab5db9585341d979c1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 8 Nov 2022 14:57:08 -0800 Subject: [PATCH] Fix issue with HF Model upload tutorial (#5359) (#5360) * Add Gradio App to ASR Docs (#5270) Signed-off-by: smajumdar Signed-off-by: smajumdar (cherry picked from commit e4b6a387e3b3d9cdf511f7b9bbb5e94925e48cc2) * Fix issue with normalized config for dataset name Signed-off-by: smajumdar Signed-off-by: smajumdar Signed-off-by: smajumdar Co-authored-by: Somshubra Majumdar --- .../Publish_NeMo_Model_On_Hugging_Face_Hub.ipynb | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tutorials/Publish_NeMo_Model_On_Hugging_Face_Hub.ipynb b/tutorials/Publish_NeMo_Model_On_Hugging_Face_Hub.ipynb index 3c184b5cbf78..1b951e7b9e8c 100644 --- a/tutorials/Publish_NeMo_Model_On_Hugging_Face_Hub.ipynb +++ b/tutorials/Publish_NeMo_Model_On_Hugging_Face_Hub.ipynb @@ -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", @@ -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": { @@ -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": {