Adityaswara commited on
Commit
c78359f
1 Parent(s): 34ad19d

Update prediction.py

Browse files
Files changed (1) hide show
  1. prediction.py +1 -2
prediction.py CHANGED
@@ -7,7 +7,6 @@ import matplotlib.pyplot as plt
7
  from PIL import Image
8
  import tensorflow as tf
9
  from tensorflow.keras.models import load_model
10
- import tensorflow_hub as hub
11
 
12
  #import pickle
13
  import pickle
@@ -15,7 +14,7 @@ import pickle
15
  #load model
16
  def run():
17
  file = st.file_uploader("Upload an image", type=["jpg", "png"])
18
- model = load_model('model_ann_sequential_improve.keras', custom_objects={'KerasLayer': hub.KerasLayer})
19
  target_size=(50, 50)
20
 
21
  def import_and_predict(image_data, model):
 
7
  from PIL import Image
8
  import tensorflow as tf
9
  from tensorflow.keras.models import load_model
 
10
 
11
  #import pickle
12
  import pickle
 
14
  #load model
15
  def run():
16
  file = st.file_uploader("Upload an image", type=["jpg", "png"])
17
+ model = tf.keras.models.load_model('model_ann_sequential_improve.keras')
18
  target_size=(50, 50)
19
 
20
  def import_and_predict(image_data, model):