Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -35,8 +35,11 @@ def predict(img, hide: float):
|
|
35 |
img = tf.image.per_image_standardization(img)
|
36 |
data = tf.expand_dims(img, 0)
|
37 |
out, *_ = model(data)
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
40 |
|
41 |
|
42 |
image = inputs.Image(label="Upload your image here!")
|
|
|
35 |
img = tf.image.per_image_standardization(img)
|
36 |
data = tf.expand_dims(img, 0)
|
37 |
out, *_ = model(data)
|
38 |
+
return {
|
39 |
+
tag: confidence
|
40 |
+
for i, tag in enumerate(tags)
|
41 |
+
if (confidence := float(out[i].numpy())) >= hide
|
42 |
+
}
|
43 |
|
44 |
|
45 |
image = inputs.Image(label="Upload your image here!")
|