code: def example_2_5():
      from happytransformer import HappyTextClassification
  
      # --------------------------------------#
      happy_tc = HappyTextClassification(
          model_type="DISTILBERT",
          model_name="distilbert-base-uncased-finetuned-sst-2-english",
          num_labels=2,
      )  # Don't forget to set num_labels!
      before_loss = happy_tc.eval("../../data/tc/train-eval.csv").loss
      happy_tc.train("../../data/tc/train-eval.csv")
      after_loss = happy_tc.eval("../../data/tc/train-eval.csv").loss
      print("Before loss: ", before_loss)  # 0.007262040860950947
      print("After loss: ", after_loss)
  
file_path: happy-transformer/examples/text_classification/readme_examples.py
imports: from happytransformer import HappyTextClassification, TCTrainArgs, TCEvalArgs, TCTestArgs
  from happytransformer import HappyTokenClassification
label_desc: Use image node_id 6 for calling a global function with example usage: example_2_5() without return types