Jyantkumar commited on
Commit
99f63ba
1 Parent(s): 3a988aa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -1
app.py CHANGED
@@ -22,7 +22,21 @@ from tensorflow.keras.utils import load_img, img_to_array
22
  from sklearn.metrics import confusion_matrix
23
 
24
 
25
- model = tf.keras.models.load_model('my_model.keras')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
 
28
  import gradio as gr
 
22
  from sklearn.metrics import confusion_matrix
23
 
24
 
25
+ vgg16_model = vgg16.VGG16(include_top=False, input_shape=(224,224,3), weights='imagenet')
26
+ vgg16_model.trainable = False
27
+ model = Sequential()
28
+ model.add(vgg16_model)
29
+ model.add(Flatten())
30
+ model.add(Dense(4096, activation='relu'))
31
+ model.add(Dense(4096, activation='relu'))
32
+ model.add(Dropout(0.25))
33
+ model.add(Dense(1, activation='sigmoid'))
34
+
35
+ model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['Accuracy'])
36
+ model.load_weight("cp.ckpt")
37
+
38
+
39
+
40
 
41
 
42
  import gradio as gr