kusumakar commited on
Commit
baa3833
1 Parent(s): 6c5de6d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -4,11 +4,13 @@ from tensorflow.keras.models import load_model
4
  from PIL import Image
5
  import numpy as np
6
  import tensorflow as tf
 
 
7
 
8
 
9
  # load the models
10
- model1 = tf.keras.models.load_model('kusumakar/Malaria_parasite_presence_detection/Model_From_VGG16.h5')
11
- model2 = tf.keras.models.load_model('kusumakar/Malaria_parasite_presence_detection/Model_Basic_From_Scratch.h5')
12
 
13
  # define a function to predict using model 1
14
  def predict_model1(image):
 
4
  from PIL import Image
5
  import numpy as np
6
  import tensorflow as tf
7
+ from transformers import AutoModel
8
+
9
 
10
 
11
  # load the models
12
+ model1 = AutoModel.from_pretrained('kusumakar/Malaria_parasite_presence_detection/Model_From_VGG16.h5')
13
+ model2 = AutoModel.from_pretrained('kusumakar/Malaria_parasite_presence_detection/Model_Basic_From_Scratch.h5')
14
 
15
  # define a function to predict using model 1
16
  def predict_model1(image):