admin commited on
Commit
745e876
·
1 Parent(s): 7f341cf
Files changed (1) hide show
  1. app.py +11 -4
app.py CHANGED
@@ -39,10 +39,17 @@ def infer(filename: str):
39
  print(results[0])
40
  prob = results[0]["probability"]
41
  if prob >= 0.10:
42
- text = "{} {}: {:.2f}%".format(
43
- results[0]["chinese_name"],
44
- results[0]["latin_name"],
45
- 100.0 * results[0]["probability"],
 
 
 
 
 
 
 
46
  )
47
 
48
  position = [box[0] + 2, box[1] - 20]
 
39
  print(results[0])
40
  prob = results[0]["probability"]
41
  if prob >= 0.10:
42
+ text = (
43
+ "{}: {:.2f}%".format(
44
+ results[0]["latin_name"],
45
+ 100.0 * results[0]["probability"],
46
+ )
47
+ if EN_US
48
+ else "{} {}: {:.2f}%".format(
49
+ results[0]["chinese_name"],
50
+ results[0]["latin_name"],
51
+ 100.0 * results[0]["probability"],
52
+ )
53
  )
54
 
55
  position = [box[0] + 2, box[1] - 20]