Update app.py
Browse files
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
|