Matej commited on
Commit
2ca471d
·
1 Parent(s): f189dde

debugging-try different model

Browse files
Files changed (1) hide show
  1. my_app.py +6 -2
my_app.py CHANGED
@@ -4,9 +4,12 @@ from huggingface_hub import from_pretrained_keras
4
  from tensorflow.keras import mixed_precision
5
 
6
  # Load your trained models
7
- model1 = from_pretrained_keras("ml-debi/EfficientNetB0-Food101")
8
  #model2 = from_pretrained_keras("ml-debi/EfficientNetB0-Food101")
9
 
 
 
 
10
  with open('classes.txt', 'r') as f:
11
  classes = [line.strip() for line in f]
12
 
@@ -26,8 +29,9 @@ This model is based on the EfficientNetB0 architecture and was trained on the Fo
26
  def preprocess(image):
27
  print("before resize", image.shape)
28
  image = tf.image.resize(image, [224, 224])
29
-
30
  image = tf.expand_dims(image, axis=0)
 
31
  print("After expanddims", image.shape)
32
  return image
33
 
 
4
  from tensorflow.keras import mixed_precision
5
 
6
  # Load your trained models
7
+ #model1 = from_pretrained_keras("ml-debi/EfficientNetB0-Food101")
8
  #model2 = from_pretrained_keras("ml-debi/EfficientNetB0-Food101")
9
 
10
+ # Try different keras model
11
+ model1 = from_pretrained_keras("NikiTricky/resnet50-food101")
12
+
13
  with open('classes.txt', 'r') as f:
14
  classes = [line.strip() for line in f]
15
 
 
29
  def preprocess(image):
30
  print("before resize", image.shape)
31
  image = tf.image.resize(image, [224, 224])
32
+
33
  image = tf.expand_dims(image, axis=0)
34
+
35
  print("After expanddims", image.shape)
36
  return image
37