Create captcha_model.tflite

#2
Files changed (1) hide show
  1. captcha_model.tflite +15 -0
captcha_model.tflite ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import tensorflow as tf
2
+
3
+ # Load your model
4
+ model = tf.keras.models.load_model("captcha_model.hdf5")
5
+
6
+ # Convert to TFLite
7
+ converter = tf.lite.TFLiteConverter.from_keras_model(model)
8
+ converter.optimizations = [tf.lite.Optimize.DEFAULT] # Makes it smaller + faster
9
+ tflite_model = converter.convert()
10
+
11
+ # Save the file
12
+ with open("captcha_model.tflite", "wb") as f:
13
+ f.write(tflite_model)
14
+
15
+ print("✅ Conversion successful!")