sprinala commited on
Commit
551e479
·
verified ·
1 Parent(s): fa77001

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -17,7 +17,8 @@ def classify_image(image):
17
  predictions = model.predict(img_array)
18
  predicted_class = class_names[np.argmax(predictions[0])]
19
  confidence = np.max(predictions[0])
20
- return predicted_class, confidence
 
21
 
22
  image_input = gr.Image() # Entferne den `shape` Parameter
23
  label = gr.Label(num_top_classes=3)
 
17
  predictions = model.predict(img_array)
18
  predicted_class = class_names[np.argmax(predictions[0])]
19
  confidence = np.max(predictions[0])
20
+ return {predicted_class: float(confidence)}
21
+
22
 
23
  image_input = gr.Image() # Entferne den `shape` Parameter
24
  label = gr.Label(num_top_classes=3)