-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
  • 309
  • 3
  • 13

1 Answers1

0

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

roman
  • 909
  • 5
  • 13