title: Not able to execute sample code provided in Hugging faces Models card
body: <p>When i am trying sample code from Hugging face i get below error.
  the code can be found from <a href="https://huggingface.co/facebook/tts_transformer-en-ljspeech" rel="nofollow noreferrer">https://huggingface.co/facebook/tts_transformer-en-ljspeech</a></p>
  <p><strong>Code:</strong></p>
  <pre><code>from fairseq.checkpoint_utils import load_model_ensemble_and_task_from_hf_hub
  from fairseq.models.text_to_speech.hub_interface import TTSHubInterface
  import IPython.display as ipd
  
  
  models, cfg, task = load_model_ensemble_and_task_from_hf_hub(
      &quot;facebook/fastspeech2-en-ljspeech&quot;,
      arg_overrides={&quot;vocoder&quot;: &quot;hifigan&quot;, &quot;fp16&quot;: False}
  )
  model = models[0]
  TTSHubInterface.update_cfg_with_data_cfg(cfg, task.data_cfg)
  generator = task.build_generator(model, cfg)
  
  text = &quot;Hello, this is a test run.&quot;
  
  sample = TTSHubInterface.get_model_input(task, text)
  wav, rate = TTSHubInterface.get_prediction(task, model, generator, sample)
  
  ipd.Audio(wav, rate=rate)
  </code></pre>
  <p><strong>Error:</strong></p>
  <pre><code>TypeError                                 Traceback (most recent call last)
  Input In [1], in &lt;module&gt;
       10 model = models[0]
       11 TTSHubInterface.update_cfg_with_data_cfg(cfg, task.data_cfg)
  ---&gt; 12 generator = task.build_generator(model, cfg)
       14 text = &quot;Hello, this is a test run.&quot;
       16 sample = TTSHubInterface.get_model_input(task, text)
  
  File ~/office/virtual_environments/eye_for_bliend/Images/fairseq/fairseq/tasks/text_to_speech.py:151, in TextToSpeechTask.build_generator(self, models, cfg, vocoder, **unused)
      149 if vocoder is None:
      150     vocoder = self.build_default_vocoder()
  --&gt; 151 model = models[0]
      152 if getattr(model, &quot;NON_AUTOREGRESSIVE&quot;, False):
      153     return NonAutoregressiveSpeechGenerator(model, vocoder, self.data_cfg)
  
  TypeError: 'TTSTransformerModel' object is not subscriptable
  </code></pre>