code: def example_7_1():
      # --------------------------------------#
      happy_tt = HappyTextToText()  # default uses t5-small
      top_p_sampling_settings = TTSettings(
          do_sample=True,
          top_k=0,
          top_p=0.8,
          temperature=0.7,
          min_length=20,
          max_length=20,
          early_stopping=True,
      )
      result = happy_tt.generate_text(
          "translate English to French: nlp is a field of artificial intelligence",
          args=top_p_sampling_settings,
      )
      print(
          result
      )  # nlp est un domaine de l’intelligence artificielle. n
      print(result.text)
  
imports: from happytransformer import HappyTextToText, TTSettings, TTTrainArgs, TTEvalArgs
label_desc: Use image node_id 2 for calling a global function with example usage: example_7_1() without return types