code: def streamline_spaces_interface(config: Dict) -> Dict:
      """Streamlines the interface config dictionary to remove unnecessary keys."""
      config["inputs"] = [
          components.get_component_instance(component)
          for component in config["input_components"]
      ]
      config["outputs"] = [
          components.get_component_instance(component)
          for component in config["output_components"]
      ]
      parameters = {
          "article",
          "description",
          "flagging_options",
          "inputs",
          "outputs",
          "title",
      }
      config = {k: config[k] for k in parameters}
      return config
  
file_path: gradio/gradio/external_utils.py
imports: import base64
  import math
  import operator
  import re
  import warnings
  from typing import Dict, List, Tuple
  import httpx
  import yaml
  from gradio import components
label_desc: Use image node_id 6 for calling a global function with example usage: streamline_spaces_interface(config) and returns: config