Sidoine commited on
Commit
c18498b
·
1 Parent(s): 66701c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -6,6 +6,7 @@ import matplotlib.pyplot as plt
6
  from tensorflow.keras.utils import load_img,img_to_array
7
  from tensorflow.keras.preprocessing import image
8
  from PIL import Image,ImageOps
 
9
 
10
  st.sidebar.image("keyce.jpg")
11
 
@@ -43,7 +44,7 @@ elif selection == "Application":
43
  test_image = image.load_img(upload_file,target_size=(299,299))
44
  image_array = img_to_array(test_image)
45
  image_array = np.expand_dims(image_array,axis=0)
46
-
47
  #Boutton pour effectuer la prédiction
48
  btn_prediction = st.button("Effectuer le diagnostic")
49
 
 
6
  from tensorflow.keras.utils import load_img,img_to_array
7
  from tensorflow.keras.preprocessing import image
8
  from PIL import Image,ImageOps
9
+ from tensorflow.keras.applications import InceptionV3
10
 
11
  st.sidebar.image("keyce.jpg")
12
 
 
44
  test_image = image.load_img(upload_file,target_size=(299,299))
45
  image_array = img_to_array(test_image)
46
  image_array = np.expand_dims(image_array,axis=0)
47
+ image_array = tf.keras.applications.inception_v3.preprocess_input(image_array)
48
  #Boutton pour effectuer la prédiction
49
  btn_prediction = st.button("Effectuer le diagnostic")
50