class_docstr: Displays a classification label, along with confidence scores of top categories, if provided.
  Preprocessing: this component does *not* accept input.
  Postprocessing: expects a {Dict[str, float]} of classes and confidences, or {str} with just the class or an {int}/{float} for regression outputs, or a {str} path to a .json file containing a json dictionary in the structure produced by Label.postprocess().
  
  Demos: main_note, titanic_survival
  Guides: image-classification-in-pytorch, image-classification-in-tensorflow, image-classification-with-vision-transformers
class_docstr_tok: ["Displays","a","classification","label",",","along","with","confidence","scores","of","top","categories",",","if","provided",".","Preprocessing",":","this","component","does","*","not","*","accept","input",".","Postprocessing",":","expects","a","{","Dict","[","str",",","float","]","}","of","classes","and","confidences",",","or","{","str","}","with","just","the","class","or","an","{","int","}","\/","{","float","}","for","regression","outputs",",","or","a","{","str","}","path","to","a",".json","file","containing","a","json","dictionary","in","the","structure","produced","by","Label.postprocess","(",")",".","Demos",":","main_note",",","titanic_survival","Guides",":","image-classification-in-pytorch",",","image-classification-in-tensorflow",",","image-classification-with-vision-transformers"]
code: def example_inputs(self) -> Any:
      return {
          "label": "Cat",
          "confidences": [
              {"label": "cat", "confidence": 0.9},
              {"label": "dog", "confidence": 0.1},
          ],
      }
  
file_path: gradio/gradio/components/label.py
imports: from __future__ import annotations
  import json
  import operator
  from pathlib import Path
  from typing import Any, Callable, List, Optional, Union
  from gradio_client.documentation import document, set_documentation_group
  from gradio.components.base import Component
  from gradio.data_classes import GradioModel
  from gradio.events import Events
label_desc: Use image node_id 4 for calling the Label obj's underlying member method code with example usage: obj.example_inputs() and returns: dict