docstr: Creates a :class:`~flash.core.data.data_module.DataModule` object from the given a list of files.
  
  This is supported only for the predicting stage.
  
  Args:
      predict_files: The list of files containing the predict data.
      predict_transform: The dictionary of transforms to use during predicting which maps.
      input_cls: The :class:`~flash.core.data.io.input.Input` used to create the dataset.
      transform_kwargs: Keyword arguments provided to the transform on instantiation.
      data_module_kwargs: The keywords arguments for creating the datamodule.
  
  Returns:
      The constructed data module.
docstr_tok: ["Creates","a",":","class",":","`","~flash.core.data.data_module.DataModule","`","object","from","the","given","a","list","of","files",".","This","is","supported","only","for","the","predicting","stage",".","Args",":","predict_files",":","The","list","of","files","containing","the","predict","data",".","predict_transform",":","The","dictionary","of","transforms","to","use","during","predicting","which","maps",".","input_cls",":","The",":","class",":","`","~flash.core.data.io.input.Input","`","used","to","create","the","dataset",".","transform_kwargs",":","Keyword","arguments","provided","to","the","transform","on","instantiation",".","data_module_kwargs",":","The","keywords","arguments","for","creating","the","datamodule",".","Returns",":","The","constructed","data","module","."]
code: def from_files(
      cls,
      predict_files: Optional[List[str]] = None,
      predict_transform: INPUT_TRANSFORM_TYPE = IceVisionInputTransform,
      input_cls: Type[Input] = IceVisionInput,
      transform_kwargs: Optional[Dict] = None,
      **data_module_kwargs: Any,
  ) -> "DataModule":
      """Creates a :class:`~flash.core.data.data_module.DataModule` object from the given a list of files.
  
      This is supported only for the predicting stage.
  
      Args:
          predict_files: The list of files containing the predict data.
          predict_transform: The dictionary of transforms to use during predicting which maps.
          input_cls: The :class:`~flash.core.data.io.input.Input` used to create the dataset.
          transform_kwargs: Keyword arguments provided to the transform on instantiation.
          data_module_kwargs: The keywords arguments for creating the datamodule.
  
      Returns:
          The constructed data module.
  
      """
      return cls(
          predict_input=input_cls(
              RunningStage.PREDICTING, predict_files
          ),
          transform=predict_transform,
          transform_kwargs=transform_kwargs,
          **data_module_kwargs,
      )
  
imports: from functools import partial
  from typing import Any, Callable, Dict, List, Optional, Type, Union
  from torch import tensor
  from flash.core.data.data_module import DataModule
  from flash.core.data.io.input import DataKeys, Input
  from flash.core.data.io.output_transform import OutputTransform
  from flash.core.data.utilities.sort import sorted_alphanumeric
  from flash.core.integrations.icevision.data import IceVisionInput
  from flash.core.integrations.icevision.transforms import IceVisionInputTransform
  from flash.core.utilities.imports import _ICEVISION_AVAILABLE, _TOPIC_IMAGE_AVAILABLE, _TORCHVISION_AVAILABLE, _TORCHVISION_GREATER_EQUAL_0_9
  from flash.core.utilities.stages import RunningStage
  from flash.core.utilities.types import INPUT_TRANSFORM_TYPE
label_desc: Use image node_id 5 for calling the InstanceSegmentationData obj's underlying member method code with example usage: obj.from_files(cls, predict_files, predict_transform, input_cls, transform_kwargs) and returns: cls