danielritchie commited on
Commit
b39c1dd
·
1 Parent(s): 827e78c

why use tflite when you can use tensorflow

Browse files
Files changed (1) hide show
  1. utils/color_model.py +5 -5
utils/color_model.py CHANGED
@@ -1,16 +1,16 @@
1
  import numpy as np
 
2
  from huggingface_hub import hf_hub_download
3
- import tflite_runtime.interpreter as tflite
4
 
5
 
6
- # Download TFLite model file
7
  model_path = hf_hub_download(
8
  repo_id="danielritchie/vibe-color-model",
9
- filename="vibe_model.tflite"
10
  )
11
 
12
- # Load interpreter
13
- interpreter = tflite.Interpreter(model_path=model_path)
14
  interpreter.allocate_tensors()
15
 
16
  input_details = interpreter.get_input_details()
 
1
  import numpy as np
2
+ import tensorflow as tf
3
  from huggingface_hub import hf_hub_download
 
4
 
5
 
6
+ # Download model file from HF
7
  model_path = hf_hub_download(
8
  repo_id="danielritchie/vibe-color-model",
9
+ filename="vibe_model.tflite" # confirm exact filename
10
  )
11
 
12
+ # Load TFLite interpreter
13
+ interpreter = tf.lite.Interpreter(model_path=model_path)
14
  interpreter.allocate_tensors()
15
 
16
  input_details = interpreter.get_input_details()