Spaces:
Sleeping
Sleeping
NikiTricky
commited on
Commit
·
bde552e
1
Parent(s):
d49f24f
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ def classify_image(inp):
|
|
7 |
print("Classifying image...")
|
8 |
inp = inp.reshape((-1, 224, 224, 3))
|
9 |
inp == inp/255
|
10 |
-
prediction = model.predict(inp)
|
11 |
confidences = {model.config['id2label'][str(i)]: float(prediction[i]) for i in range(101)}
|
12 |
return confidences
|
13 |
|
|
|
7 |
print("Classifying image...")
|
8 |
inp = inp.reshape((-1, 224, 224, 3))
|
9 |
inp == inp/255
|
10 |
+
prediction = model.predict(inp)[0]
|
11 |
confidences = {model.config['id2label'][str(i)]: float(prediction[i]) for i in range(101)}
|
12 |
return confidences
|
13 |
|