docstr: Push your model to [huggingface's model hub](https://huggingface.co/models).
  
  Args:
      repo_id:
          The name of the repository you want to push your model and tokenizer to.
          It should contain your organization name when pushing to a given organization.
      generate_card:
          Whether to generate (and push) a model card for your model. Defaults to True.
docstr_tok: ["Push","your","model","to","[","huggingface","'s","model","hub","]","(","https",":","\/\/huggingface.co\/models",")",".","Args",":","repo_id",":","The","name","of","the","repository","you","want","to","push","your","model","and","tokenizer","to",".","It","should","contain","your","organization","name","when","pushing","to","a","given","organization",".","generate_card",":","Whether","to","generate","(","and","push",")","a","model","card","for","your","model",".","Defaults","to","True","."]
code: def push_to_huggingface(
      self, repo_id: str, generate_card: Optional[bool] = True, **kwargs
  ) -> None:
      """Push your model to [huggingface's model hub](https://huggingface.co/models).
  
      Args:
          repo_id:
              The name of the repository you want to push your model and tokenizer to.
              It should contain your organization name when pushing to a given organization.
          generate_card:
              Whether to generate (and push) a model card for your model. Defaults to True.
      """
      if not kwargs.get("token"):
          # Try obtaining the token with huggingface_hub utils as a last resort, or let it fail.
          from huggingface_hub import HfFolder
  
          if token := HfFolder.get_token():
              kwargs["token"] = token
  
          # One last check for the tests. We use a different env var name
          # that the one gathered with HfFolder.get_token
          if token := kwargs.get(
              "token", os.environ.get("HF_HUB_ACCESS_TOKEN", None)
          ):
              kwargs["token"] = token
  
      url = self._trainer.push_to_huggingface(repo_id, **kwargs)
  
      if generate_card:
          model_card = self.generate_model_card()
          # For spacy based models, overwrite the repo_id with the url variable returned
          # from its trainer.
          if getattr(self._trainer, "language", None):
              repo_id = url
  
          model_card.push_to_hub(
              repo_id, repo_type="model", token=kwargs["token"]
          )
  
imports: import os
  import textwrap
  import warnings
  from pathlib import Path
  from typing import TYPE_CHECKING, Dict, List, Optional, Union
  from argilla.client.feedback.schemas.records import FeedbackRecord
  from argilla.client.feedback.training.schemas.base import TrainingTaskForTextClassification, TrainingTaskTypes
  from argilla.client.models import Framework, TextClassificationRecord
  from argilla.training.base import ArgillaTrainer
  from argilla.training.base import ArgillaTrainerSkeleton
label_desc: Use image node_id 8 for calling the ArgillaTrainer obj's underlying member method code with example usage: obj.push_to_huggingface(repo_id, generate_card) without return types