Sa-m commited on
Commit
cc9f68a
·
1 Parent(s): 9546bbe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -7,7 +7,7 @@ import os
7
  import numpy as np
8
 
9
 
10
- labels= {'Burger King': 0, 'KFC': 1,'McDonalds': 2,'Other': 3,'Starbucks': 4,'Subway': 5}
11
  HEIGHT,WIDTH=224,224
12
  NUM_CLASSES=6
13
 
@@ -43,7 +43,7 @@ def classify_image(inp):
43
  result[label] = float(predicted_class_indices[i])
44
  except KeyError:
45
  print(f"KeyError: Label not found for index {predicted_class_indices[i]}")
46
- return f"{prediction}...{prediction[0][2]}..{predicted_class_indices}"
47
 
48
 
49
 
 
7
  import numpy as np
8
 
9
 
10
+ # labels= {'Burger King': 0, 'KFC': 1,'McDonalds': 2,'Other': 3,'Starbucks': 4,'Subway': 5}
11
  HEIGHT,WIDTH=224,224
12
  NUM_CLASSES=6
13
 
 
43
  result[label] = float(predicted_class_indices[i])
44
  except KeyError:
45
  print(f"KeyError: Label not found for index {predicted_class_indices[i]}")
46
+ return f"{labels[i]: float(prediction[i]) for i in range(NUM_CLASSES)}"
47
 
48
 
49