Update app.py
Browse files
app.py
CHANGED
|
@@ -5,10 +5,11 @@ import tensorflow as tf
|
|
| 5 |
model = from_pretrained_keras("araeynn/e")
|
| 6 |
|
| 7 |
def image_classifier(inp):
|
|
|
|
| 8 |
inp.save("why.png")
|
| 9 |
sunflower_path = "why.png"
|
| 10 |
img = tf.keras.utils.load_img(
|
| 11 |
-
sunflower_path, target_size=(
|
| 12 |
)
|
| 13 |
img_array = tf.keras.utils.img_to_array(img)
|
| 14 |
img_array = tf.expand_dims(img_array, 0) # Create a batch
|
|
|
|
| 5 |
model = from_pretrained_keras("araeynn/e")
|
| 6 |
|
| 7 |
def image_classifier(inp):
|
| 8 |
+
class_names = ["Gingivitis", "Hypodontia"]
|
| 9 |
inp.save("why.png")
|
| 10 |
sunflower_path = "why.png"
|
| 11 |
img = tf.keras.utils.load_img(
|
| 12 |
+
sunflower_path, target_size=(180, 180)
|
| 13 |
)
|
| 14 |
img_array = tf.keras.utils.img_to_array(img)
|
| 15 |
img_array = tf.expand_dims(img_array, 0) # Create a batch
|