class_docstr: A base class for defining methods that all input/output components should have.
class_docstr_tok: ["A","base","class","for","defining","methods","that","all","input\/output","components","should","have","."]
code: def __init__(
      self,
      value: Any = None,
      *,
      label: str | None = None,
      info: str | None = None,
      show_label: bool | None = None,
      container: bool = True,
      scale: int | None = None,
      min_width: int | None = None,
      interactive: bool | None = None,
      visible: bool = True,
      elem_id: str | None = None,
      elem_classes: list[str] | str | None = None,
      render: bool = True,
      load_fn: Callable | None = None,
      every: float | None = None,
  ):
      self.server_fns = [
          value
          for value in self.__class__.__dict__.values()
          if callable(value) and getattr(value, "_is_server_fn", False)
      ]
  
      # Svelte components expect elem_classes to be a list
      # If we don't do this, returning a new component for an
      # update will break the frontend
      if not elem_classes:
          elem_classes = []
  
      # This gets overridden when `select` is called
      self._selectable = False
      if not hasattr(self, "data_model"):
          self.data_model: type[GradioDataModel] | None = None
  
      Block.__init__(
          self,
          elem_id=elem_id,
          elem_classes=elem_classes,
          visible=visible,
          render=render,
      )
      if isinstance(self, StreamingInput):
          self.check_streamable()
  
      self.label = label
      self.info = info
      if not container:
          if show_label:
              warnings.warn(
                  "show_label has no effect when container is False."
              )
          show_label = False
      if show_label is None:
          show_label = True
      self.show_label = show_label
      self.container = container
      if scale is not None and scale != round(scale):
          warnings.warn(
              f"'scale' value should be an integer. Using {scale} will cause issues."
          )
      self.scale = scale
      self.min_width = min_width
      self.interactive = interactive
  
      # load_event is set in the Blocks.attach_load_events method
      self.load_event: None | dict[str, Any] = None
      self.load_event_to_attach: None | tuple[
          Callable, float | None
      ] = None
      load_fn, initial_value = self.get_load_fn_and_initial_value(value)
      initial_value = self.postprocess(initial_value)
      self.value = move_files_to_cache(initial_value, self, postprocess=True)  # type: ignore
  
      if callable(load_fn):
          self.attach_load_event(load_fn, every)
  
      self.component_class_id = self.__class__.get_component_class_id()
  
imports: from __future__ import annotations
  import abc
  import hashlib
  import json
  import sys
  import warnings
  from abc import ABC, abstractmethod
  from enum import Enum
  from pathlib import Path
  from typing import TYPE_CHECKING, Any, Callable
  from gradio_client.documentation import set_documentation_group
  from PIL import Image
  from gradio import utils
  from gradio.blocks import Block, BlockContext
  from gradio.component_meta import ComponentMeta
  from gradio.data_classes import GradioDataModel
  from gradio.events import EventListener
  from gradio.layouts import Form
  from gradio.processing_utils import move_files_to_cache
label_desc: Use image node_id 1 to create a new Component object from inherited base classes: ComponentBase, Block with example: obj = Component(value)