Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,10 +4,10 @@ from PIL import Image
|
|
| 4 |
import numpy as np
|
| 5 |
|
| 6 |
# Lade dein Modell (hier als Beispiel die Keras .h5 Datei)
|
| 7 |
-
model = tf.keras.models.load_model('
|
| 8 |
|
| 9 |
# Klassennamen, sollten deinem Dataset entsprechen
|
| 10 |
-
class_names = ['
|
| 11 |
|
| 12 |
def classify_image(image):
|
| 13 |
image = Image.fromarray(image.astype('uint8'), 'RGB')
|
|
@@ -27,7 +27,7 @@ iface = gr.Interface(
|
|
| 27 |
fn=classify_image,
|
| 28 |
inputs=image_input,
|
| 29 |
outputs=label,
|
| 30 |
-
title='
|
| 31 |
description='Upload an image of Jolteon, Kakuna, Mr. Mime and the classifier will tell you which one it is and the confidence level of the prediction.').launch()
|
| 32 |
|
| 33 |
iface.launch()
|
|
|
|
| 4 |
import numpy as np
|
| 5 |
|
| 6 |
# Lade dein Modell (hier als Beispiel die Keras .h5 Datei)
|
| 7 |
+
model = tf.keras.models.load_model('gym_equipment_transferlearning.keras')
|
| 8 |
|
| 9 |
# Klassennamen, sollten deinem Dataset entsprechen
|
| 10 |
+
class_names = ['benchPress', 'dumbBell', 'kettleBell', 'treadMill']
|
| 11 |
|
| 12 |
def classify_image(image):
|
| 13 |
image = Image.fromarray(image.astype('uint8'), 'RGB')
|
|
|
|
| 27 |
fn=classify_image,
|
| 28 |
inputs=image_input,
|
| 29 |
outputs=label,
|
| 30 |
+
title='Gym Equipment Classifier',
|
| 31 |
description='Upload an image of Jolteon, Kakuna, Mr. Mime and the classifier will tell you which one it is and the confidence level of the prediction.').launch()
|
| 32 |
|
| 33 |
iface.launch()
|