Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ from tensorflow.keras.applications.resnet50 import preprocess_input
|
|
6 |
from tensorflow.keras.models import load_model
|
7 |
|
8 |
# Load your trained model
|
9 |
-
model = load_model('
|
10 |
|
11 |
def predict_pokemon(img):
|
12 |
img = Image.fromarray(img.astype('uint8'), 'RGB') # Ensure the image is in RGB
|
@@ -23,8 +23,8 @@ def predict_pokemon(img):
|
|
23 |
interface = gr.Interface(fn=predict_pokemon,
|
24 |
inputs="image", # Simplified input type
|
25 |
outputs="label", # Simplified output type
|
26 |
-
title="
|
27 |
-
description="Upload an image of a
|
28 |
|
29 |
# Launch the interface
|
30 |
interface.launch()
|
|
|
6 |
from tensorflow.keras.models import load_model
|
7 |
|
8 |
# Load your trained model
|
9 |
+
model = load_model('/home/user/app/franckew.h5') # Ensure this path is correct
|
10 |
|
11 |
def predict_pokemon(img):
|
12 |
img = Image.fromarray(img.astype('uint8'), 'RGB') # Ensure the image is in RGB
|
|
|
23 |
interface = gr.Interface(fn=predict_pokemon,
|
24 |
inputs="image", # Simplified input type
|
25 |
outputs="label", # Simplified output type
|
26 |
+
title="One Piece Classifier",
|
27 |
+
description="Upload an image of a OP Character and the classifier will predict its name.")
|
28 |
|
29 |
# Launch the interface
|
30 |
interface.launch()
|