-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?

3

1 Answer 1

0

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

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.