DHEIVER commited on
Commit
b4734ce
1 Parent(s): 5c1666a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -52,11 +52,12 @@ def classify_image(input_image):
52
 
53
  # Escreva o r贸tulo de previs茫o no output_image_with_box (com a cor da caixa e estat铆sticas)
54
  font = cv2.FONT_HERSHEY_SIMPLEX
55
- cv2.putText(output_image_with_box, f"Predicted Class: {predicted_class}", (10, 20), font, 0.5, (0, 255, 0), 2) # Cor verde
 
56
 
57
  # Adicione estat铆sticas (substitua com suas pr贸prias estat铆sticas)
58
  stats = f"Accuracy: {prediction[0][class_index]:.2f}, Confidence: {prediction[0].max():.2f}"
59
- cv2.putText(output_image_with_box, stats, (10, 40), font, 0.5, (0, 255, 0), 2)
60
 
61
  return output_image_with_box
62
 
 
52
 
53
  # Escreva o r贸tulo de previs茫o no output_image_with_box (com a cor da caixa e estat铆sticas)
54
  font = cv2.FONT_HERSHEY_SIMPLEX
55
+ font_scale = 0.4 # Tamanho da fonte reduzido
56
+ cv2.putText(output_image_with_box, f"Predicted Class: {predicted_class}", (10, 20), font, font_scale, (0, 255, 0), 1) # Cor verde
57
 
58
  # Adicione estat铆sticas (substitua com suas pr贸prias estat铆sticas)
59
  stats = f"Accuracy: {prediction[0][class_index]:.2f}, Confidence: {prediction[0].max():.2f}"
60
+ cv2.putText(output_image_with_box, stats, (10, 40), font, font_scale, (0, 255, 0), 1)
61
 
62
  return output_image_with_box
63