developeeeeerrrrr commited on
Commit
6d0c59c
·
verified ·
1 Parent(s): efa7843

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,12 +1,12 @@
1
  from tensorflow.keras.preprocessing.image import load_img, img_to_array
2
  import numpy as np
3
- import opencv-python as op
4
  import gradio as gd
5
  from keras.models import load_model
6
  model2 = load_model("./my_model.keras")
7
 
8
  def predict(image):
9
- image=op.resize(image,(240,240))
10
  image=img_to_array(image)/255.0
11
  image = np.expand_dims(image, axis=0)
12
  prediction=model2.predict(image)
 
1
  from tensorflow.keras.preprocessing.image import load_img, img_to_array
2
  import numpy as np
3
+ import cv2
4
  import gradio as gd
5
  from keras.models import load_model
6
  model2 = load_model("./my_model.keras")
7
 
8
  def predict(image):
9
+ image=cv2.resize(image,(240,240))
10
  image=img_to_array(image)/255.0
11
  image = np.expand_dims(image, axis=0)
12
  prediction=model2.predict(image)