You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import tflite_runtime.interpreter as tflite --> import ai_edge_litert.interpreter as tflite
Maybe something as simple as this?
try:
# Attempt to import the newer LiteRT runtime
import ai_edge_litert.interpreter as tflite
except ImportError:
try:
# Fallback to the original tflite_runtime if LiteRT is unavailable
import tflite_runtime.interpreter as tflite
except ImportError:
raise ImportError("Neither LiteRT nor TensorFlow Lite runtime found. Please install `ai_edge_litert` or `tflite_runtime`.")
The text was updated successfully, but these errors were encountered:
Per https://developers.googleblog.com/en/tensorflow-lite-is-now-litert/
import tflite_runtime.interpreter as tflite
-->import ai_edge_litert.interpreter as tflite
Maybe something as simple as this?
The text was updated successfully, but these errors were encountered: