code: def example_1_2():
      happy_gen = HappyGeneration()
  
      greedy_settings = GENSettings(
          no_repeat_ngram_size=2, max_length=10
      )
      output_greedy = happy_gen.generate_text(
          "Artificial intelligence is ", args=greedy_settings
      )
  
      beam_settings = GENSettings(
          early_stopping=True, num_beams=5, max_length=10
      )
      output_beam_search = happy_gen.generate_text(
          "Artificial intelligence is ", args=beam_settings
      )
  
      generic_sampling_settings = GENSettings(
          do_sample=True,
          early_stopping=False,
          top_k=0,
          temperature=0.7,
          max_length=10,
      )
      output_generic_sampling = happy_gen.generate_text(
          "Artificial intelligence is ", args=generic_sampling_settings
      )
  
      top_k_sampling_settings = GENSettings(
          do_sample=True,
          early_stopping=False,
          top_k=50,
          temperature=0.7,
          max_length=10,
      )
      output_top_k_sampling = happy_gen.generate_text(
          "Artificial intelligence is ", args=top_k_sampling_settings
      )
  
      top_p_sampling_settings = GENSettings(
          do_sample=True,
          top_k=0,
          top_p=0.8,
          temperature=0.7,
          max_length=10,
      )
      output_top_p_sampling = happy_gen.generate_text(
          "Artificial intelligence is ", args=top_p_sampling_settings
      )
  
      print(
          "Greedy:", output_greedy.text
      )  # a new field of research that has been gaining
      print(
          "Beam:", output_beam_search.text
      )  # one of the most promising areas of research in
      print(
          "Generic Sampling:", output_generic_sampling.text
      )  #  an area of highly promising research, and a
      print(
          "Top-k Sampling:", output_top_k_sampling.text
      )  # a new form of social engineering. In this
      print("Top-p Sampling:", output_top_p_sampling.text)
  
imports: from happytransformer import HappyGeneration, GENSettings, GENTrainArgs, GENEvalArgs
label_desc: Use image node_id 3 for calling a global function with example usage: example_1_2() without return types