code: def load(
      name: str,
      src: str | None = None,
      hf_token: str | None = None,
      alias: str | None = None,
      **kwargs,
  ) -> Blocks:
      """
      Method that constructs a Blocks from a Hugging Face repo. Can accept
      model repos (if src is "models") or Space repos (if src is "spaces"). The input
      and output components are automatically loaded from the repo.
      Parameters:
          name: the name of the model (e.g. "gpt2" or "facebook/bart-base") or space (e.g. "flax-community/spanish-gpt2"), can include the `src` as prefix (e.g. "models/facebook/bart-base")
          src: the source of the model: `models` or `spaces` (or leave empty if source is provided as a prefix in `name`)
          hf_token: optional access token for loading private Hugging Face Hub models or spaces. Find your token here: https://huggingface.co/settings/tokens.  Warning: only provide this if you are loading a trusted private Space as it can be read by the Space you are loading.
          alias: optional string used as the name of the loaded model instead of the default name (only applies if loading a Space running Gradio 2.x)
      Returns:
          a Gradio Blocks object for the given model
      Example:
          import gradio as gr
          demo = gr.load("gradio/question-answering", src="spaces")
          demo.launch()
      """
      return load_blocks_from_repo(
          name=name, src=src, hf_token=hf_token, alias=alias, **kwargs
      )
  
imports: from __future__ import annotations
  import json
  import os
  import re
  import tempfile
  import warnings
  from pathlib import Path
  from typing import TYPE_CHECKING, Callable
  import httpx
  from gradio_client import Client
  from gradio_client import utils
  from gradio_client.client import Endpoint
  from gradio_client.documentation import document, set_documentation_group
  from packaging import version
  import gradio
  from gradio import components, utils
  from gradio.context import Context
  from gradio.exceptions import Error, GradioVersionIncompatibleError, ModelNotFoundError, TooManyRequestsError
  from gradio.external_utils import cols_to_rows, encode_to_base64, get_tabular_examples, postprocess_label, rows_to_cols, streamline_spaces_interface
  from gradio.processing_utils import extract_base64_data, save_base64_to_cache, to_binary
label_desc: Use image node_id 1 for calling a global function with example usage: load(name, src, hf_token, alias) and returns: load_blocks_from_repo