Spaces:
Runtime error
Runtime error
Update funciones.py
Browse files- funciones.py +5 -2
funciones.py
CHANGED
@@ -7,5 +7,8 @@ def clasificacion(text):
|
|
7 |
|
8 |
|
9 |
def clasifica_imagen(img):
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
7 |
|
8 |
|
9 |
def clasifica_imagen(img):
|
10 |
+
inp = inp.reshape((-1224,224,3))
|
11 |
+
inp = tf.keras.applications.mobilenet_v2.preprocess_input(inp)
|
12 |
+
prediction = inception_net.predict(inp).flatten()
|
13 |
+
confidences = {etiquetas[i]:float(prediction[i]) for i in range(1000)}
|
14 |
+
return confidences
|