annanau commited on
Commit
75d623a
·
verified ·
1 Parent(s): fe81cc0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -3,9 +3,11 @@ import tensorflow as tf
3
  from tensorflow.keras.preprocessing import image
4
  import numpy as np
5
  from PIL import Image
 
6
 
7
  # Load your trained Xception model
8
- model = tf.keras.models.load_model("xception-070523")
 
9
 
10
  # Define the labels for your classification (example: if you have 3 classes)
11
  class_labels = ['0', '1', '2', '3'] # Replace with your actual class names
 
3
  from tensorflow.keras.preprocessing import image
4
  import numpy as np
5
  from PIL import Image
6
+ from keras import layers
7
 
8
  # Load your trained Xception model
9
+ #model = tf.keras.models.load_model("xception-070523")
10
+ model = layers.TFSMLayer("xception-070523", call_endpoint='serving_default')
11
 
12
  # Define the labels for your classification (example: if you have 3 classes)
13
  class_labels = ['0', '1', '2', '3'] # Replace with your actual class names