# Class ModelSource

java.lang.Object
com.codename1.ai.inference.ModelSource

public final class ModelSource extends Object
A `.tflite` model supplied as bytes, a filesystem path, or an app resource.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `BYTES`
  `static final int`
  `FILE`
  `static final int`
  `RESOURCE`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static ModelSource`
  `bytes(byte[] value)`
  `static ModelSource`
  `file(String path)`
  `byte[]`
  `getBytes()`
  `int`
  `getKind()`
  `String`
  `getPath()`
  `static ModelSource`
  `resource(String path)`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### BYTES

    public static final int BYTES
    See Also:
      - Constant Field Values

  - ### FILE

    public static final int FILE
    See Also:
      - Constant Field Values

  - ### RESOURCE

    public static final int RESOURCE
    See Also:
      - Constant Field Values

- ## Method Details

  - ### bytes

    public static ModelSource bytes(byte[] value)

  - ### file

    public static ModelSource file(String path)

  - ### resource

    public static ModelSource resource(String path)

  - ### getKind

    public int getKind()

  - ### getBytes

    public byte[] getBytes()

  - ### getPath

    public String getPath()