Reaumur commited on
Commit
55cee5f
·
verified ·
1 Parent(s): 593fd5f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -3,11 +3,12 @@ from PIL import Image
3
  import tensorflow as tf
4
  import numpy as np
5
  import os
 
6
 
7
  # Caching the model loading function to optimize performance
8
  @st.cache_resource
9
  def load_model():
10
- model_path = "captcha.keras" # Update with the actual model path
11
  return tf.keras.models.load_model(model_path)
12
 
13
  # Load the model
 
3
  import tensorflow as tf
4
  import numpy as np
5
  import os
6
+ from keras.models import load_model
7
 
8
  # Caching the model loading function to optimize performance
9
  @st.cache_resource
10
  def load_model():
11
+ model_path = ('captcha.keras', custom_objects={'CustomLayer': CustomLayer}) # Update with the actual model path
12
  return tf.keras.models.load_model(model_path)
13
 
14
  # Load the model