Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

taskload
/
political-setfit

Text Classification
sentence-transformers
PyTorch
setfit
roberta
text-embeddings-inference
Model card Files Files and versions
xet
Community

Instructions to use taskload/political-setfit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • sentence-transformers

    How to use taskload/political-setfit with sentence-transformers:

    from sentence_transformers import SentenceTransformer
    
    model = SentenceTransformer("taskload/political-setfit")
    
    sentences = [
        "The weather is lovely today.",
        "It's so sunny outside!",
        "He drove to the stadium."
    ]
    embeddings = model.encode(sentences)
    
    similarities = model.similarity(embeddings, embeddings)
    print(similarities.shape)
    # [3, 3]
  • setfit

    How to use taskload/political-setfit with setfit:

    from setfit import SetFitModel
    
    model = SetFitModel.from_pretrained("taskload/political-setfit")
  • Notebooks
  • Google Colab
  • Kaggle
political-setfit
502 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 2 commits
taskload's picture
taskload
Add SetFit model
077c7f5 over 3 years ago
  • 1_Pooling
    Add SetFit model over 3 years ago
  • .gitattributes
    1.48 kB
    initial commit over 3 years ago
  • README.md
    1.52 kB
    Add SetFit model over 3 years ago
  • config.json
    707 Bytes
    Add SetFit model over 3 years ago
  • config_sentence_transformers.json
    118 Bytes
    Add SetFit model over 3 years ago
  • merges.txt
    456 kB
    Add SetFit model over 3 years ago
  • model_head.pkl

    Detected Pickle imports (8)

    • "builtins.set",
    • "torch._utils._rebuild_tensor_v2",
    • "collections.OrderedDict",
    • "torch.storage._load_from_bytes",
    • "torch.device",
    • "torch._utils._rebuild_parameter",
    • "setfit.modeling.SetFitHead",
    • "torch.nn.modules.linear.Linear"

    How to fix it?

    7.66 kB
    xet
    Add SetFit model over 3 years ago
  • modules.json
    229 Bytes
    Add SetFit model over 3 years ago
  • pytorch_model.bin

    Detected Pickle imports (4)

    • "torch.FloatStorage",
    • "torch._utils._rebuild_tensor_v2",
    • "torch.LongStorage",
    • "collections.OrderedDict"

    What is a pickle import?

    499 MB
    xet
    Add SetFit model over 3 years ago
  • sentence_bert_config.json
    53 Bytes
    Add SetFit model over 3 years ago
  • special_tokens_map.json
    280 Bytes
    Add SetFit model over 3 years ago
  • tokenizer.json
    2.11 MB
    Add SetFit model over 3 years ago
  • tokenizer_config.json
    394 Bytes
    Add SetFit model over 3 years ago
  • vocab.json
    798 kB
    Add SetFit model over 3 years ago