Update app.py
Browse files
app.py
CHANGED
@@ -5,12 +5,12 @@ import numpy as np
|
|
5 |
|
6 |
# Load your custom regression model
|
7 |
model_path = "kia_mnist_keras_model.weights.h5"
|
8 |
-
model_path = "
|
9 |
|
10 |
#model.load_weights(model_path)
|
11 |
model = tf.keras.models.load_model(model_path)
|
12 |
|
13 |
-
labels = ['
|
14 |
|
15 |
# Define regression function
|
16 |
def predict_regression(image):
|
@@ -26,10 +26,10 @@ def predict_regression(image):
|
|
26 |
|
27 |
# Create Gradio interface
|
28 |
input_image = gr.Image()
|
29 |
-
output_text = gr.Textbox(label="Predicted
|
30 |
interface = gr.Interface(fn=predict_regression,
|
31 |
inputs=input_image,
|
32 |
outputs=gr.Label(),
|
33 |
-
examples=["images/
|
34 |
description="A simple mlp classification model for image classification using the mnist dataset.")
|
35 |
interface.launch()
|
|
|
5 |
|
6 |
# Load your custom regression model
|
7 |
model_path = "kia_mnist_keras_model.weights.h5"
|
8 |
+
model_path = "Ditto-premiumdelux-model_transferlearning.keras"
|
9 |
|
10 |
#model.load_weights(model_path)
|
11 |
model = tf.keras.models.load_model(model_path)
|
12 |
|
13 |
+
labels = ['Ditto','Golbat','Koffing']
|
14 |
|
15 |
# Define regression function
|
16 |
def predict_regression(image):
|
|
|
26 |
|
27 |
# Create Gradio interface
|
28 |
input_image = gr.Image()
|
29 |
+
output_text = gr.Textbox(label="Predicted Pokemon")
|
30 |
interface = gr.Interface(fn=predict_regression,
|
31 |
inputs=input_image,
|
32 |
outputs=gr.Label(),
|
33 |
+
examples=["images/Ditto.jpeg", "images/Golbat.jpeg", "images/Koffing.jpeg"],
|
34 |
description="A simple mlp classification model for image classification using the mnist dataset.")
|
35 |
interface.launch()
|