etahamad commited on
Commit
a113afc
1 Parent(s): 5383a45

add model v5

Browse files
Files changed (2) hide show
  1. app.py +4 -4
  2. plant_model_v5-beta.h5 +3 -0
app.py CHANGED
@@ -32,17 +32,17 @@ def main():
32
  st.write('Prediction : {}'.format(result))
33
  st.write('Confidence : {}%'.format(confidence))
34
 
 
35
 
36
  def predict_class(image):
37
  with st.spinner('Loading Model...'):
38
  classifier_model = keras.models.load_model(
39
- r'plant_model_v1-beta.h5', compile=False)
40
 
41
- shape = ((200, 200, 3))
42
- # ye bhi kaam kar raha he
43
  model = keras.Sequential(
44
  [hub.KerasLayer(classifier_model, input_shape=shape)])
45
- test_image = image.resize((200, 200))
46
  test_image = keras.preprocessing.image.img_to_array(test_image)
47
  test_image /= 220.0
48
  test_image = np.expand_dims(test_image, axis=0)
32
  st.write('Prediction : {}'.format(result))
33
  st.write('Confidence : {}%'.format(confidence))
34
 
35
+ imgSize = 256
36
 
37
  def predict_class(image):
38
  with st.spinner('Loading Model...'):
39
  classifier_model = keras.models.load_model(
40
+ r'plant_model_v5-beta.h5', compile=False)
41
 
42
+ shape = ((imgSize, imgSize, 3))
 
43
  model = keras.Sequential(
44
  [hub.KerasLayer(classifier_model, input_shape=shape)])
45
+ test_image = image.resize((imgSize, imgSize))
46
  test_image = keras.preprocessing.image.img_to_array(test_image)
47
  test_image /= 220.0
48
  test_image = np.expand_dims(test_image, axis=0)
plant_model_v5-beta.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:355bb4d8fdca1f3674a3f3c592353471fdd340ddc3c0ec211346a7de203c2598
3
+ size 15806664