code: def convert_from_transformers():
      transformers_input_name = (
          "deepset/bert-base-german-cased-hatespeech-GermEval18Coarse"
      )
      farm_output_dir = Path(
          "../saved_models/farm-bert-base-german-cased-hatespeech-GermEval18Coarse"
      )
  
      # # CASE 1: MODEL
      # # Load model from transformers model hub (-> continue training / compare models / ...)
      model = Converter.convert_from_transformers(
          transformers_input_name, device="cpu"
      )
  
      # # Alternative way to load from transformers model hub:
      # model = AdaptiveModel.convert_from_transformers(transformers_input_name, device="cpu", task_type="text_classification")
      # # ... continue as in the other examples e.g. to fine-tune this QA model on your own data
      #
      # # CASE 2: INFERENCER
      # # Load Inferencer from transformers, incl. model & tokenizer (-> just get predictions)
      nlp = Inferencer.load(
          transformers_input_name, task_type="text_classification"
      )
      #
      # # run predictions
      result = nlp.inference_from_dicts(
          dicts=[{"text": "Was ein scheiß Nazi!"}]
      )
      pprint.pprint(result)
      nlp.close_multiprocessing_pool()
  
      # save it
      nlp.save(farm_output_dir)
  
file_path: FARM/examples/conversion_huggingface_models_classification.py
imports: from farm.modeling.adaptive_model import AdaptiveModel
  from farm.conversion.transformers import Converter
  from farm.data_handler.processor import Processor
  from farm.infer import Inferencer
  import pprint
  from transformers.pipelines import pipeline
  from pathlib import Path
label_desc: Use image node_id 1 for calling a global function with example usage: convert_from_transformers() without return types