Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,6 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import tensorflow as tf
|
| 3 |
-
|
| 4 |
-
import numpy as np
|
| 5 |
|
| 6 |
# Lade dein benutzerdefiniertes Regressionsmodell
|
| 7 |
model = tf.keras.models.load_model('Task_Pokemon.keras')
|
|
@@ -18,8 +17,8 @@ def classify_image(image):
|
|
| 18 |
confidence = np.max(predictions[0])
|
| 19 |
return predicted_class, confidence
|
| 20 |
|
| 21 |
-
image_input = gr.
|
| 22 |
-
label = gr.
|
| 23 |
|
| 24 |
iface = gr.Interface(
|
| 25 |
fn=classify_image,
|
|
@@ -28,5 +27,4 @@ iface = gr.Interface(
|
|
| 28 |
title='Pokémon Klassifizierer',
|
| 29 |
description='Lade ein Bild von Aerodactyl, Charizard oder Victreebel hoch und der Klassifizierer wird dir mitteilen, um welches Pokémon es sich handelt, sowie das Vertrauensniveau der Vorhersage.'
|
| 30 |
)
|
| 31 |
-
|
| 32 |
iface.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import tensorflow as tf
|
| 3 |
+
|
|
|
|
| 4 |
|
| 5 |
# Lade dein benutzerdefiniertes Regressionsmodell
|
| 6 |
model = tf.keras.models.load_model('Task_Pokemon.keras')
|
|
|
|
| 17 |
confidence = np.max(predictions[0])
|
| 18 |
return predicted_class, confidence
|
| 19 |
|
| 20 |
+
image_input = gr.Image()
|
| 21 |
+
label = gr.Label(num_top_classes=3)
|
| 22 |
|
| 23 |
iface = gr.Interface(
|
| 24 |
fn=classify_image,
|
|
|
|
| 27 |
title='Pokémon Klassifizierer',
|
| 28 |
description='Lade ein Bild von Aerodactyl, Charizard oder Victreebel hoch und der Klassifizierer wird dir mitteilen, um welches Pokémon es sich handelt, sowie das Vertrauensniveau der Vorhersage.'
|
| 29 |
)
|
|
|
|
| 30 |
iface.launch()
|