-2

I am writing confidence level using following code into my Image

 text1="color is {}".format(f'Class #{i + 1}-{class_names[ind]}-Confidence: {100 * conf}%')

how do I limit my confidence number to two decimal places rather than the 10 or so it gives?

nikki
  • 365
  • 4
  • 20

1 Answers1

0

f'{100 * conf:.2f}' has to work

roman
  • 1,061
  • 6
  • 14