Update app.py
Browse files
app.py
CHANGED
|
@@ -10,7 +10,7 @@ class_names = ['Aerodactyl', 'Charizard', 'Victreebel']
|
|
| 10 |
|
| 11 |
def classify_image(image):
|
| 12 |
# Konvertiere das Bild in ein PIL-Bildobjekt
|
| 13 |
-
img_pil = image.resize((160, 160)) # Hier definieren wir die
|
| 14 |
img_array = tf.keras.preprocessing.image.img_to_array(img_pil)
|
| 15 |
img_array = tf.expand_dims(img_array, 0) # Erstelle einen Batch
|
| 16 |
predictions = model.predict(img_array)
|
|
@@ -25,7 +25,7 @@ iface = gr.Interface(
|
|
| 25 |
fn=classify_image,
|
| 26 |
inputs=image_input,
|
| 27 |
outputs=label,
|
| 28 |
-
title='Pokémon
|
| 29 |
-
description='Lade ein Bild von Aerodactyl, Charizard oder Victreebel hoch
|
| 30 |
)
|
| 31 |
iface.launch()
|
|
|
|
| 10 |
|
| 11 |
def classify_image(image):
|
| 12 |
# Konvertiere das Bild in ein PIL-Bildobjekt
|
| 13 |
+
img_pil = image.resize((160, 160)) # Hier definieren wir die Grösse der Bilder
|
| 14 |
img_array = tf.keras.preprocessing.image.img_to_array(img_pil)
|
| 15 |
img_array = tf.expand_dims(img_array, 0) # Erstelle einen Batch
|
| 16 |
predictions = model.predict(img_array)
|
|
|
|
| 25 |
fn=classify_image,
|
| 26 |
inputs=image_input,
|
| 27 |
outputs=label,
|
| 28 |
+
title='Pokémon-Bildklassifizierer',
|
| 29 |
+
description='Lade ein Bild von Aerodactyl, Charizard oder Victreebel hoch. Unser Klassifizierer wird das Pokémon identifizieren und das Vertrauensniveau der Vorhersage anzeigen.'
|
| 30 |
)
|
| 31 |
iface.launch()
|