Browse Source

fix: 修复垃圾分类搜索置信度显示错误的问题

SongZihuan 3 năm trước cách đây
mục cha
commit
abddab25e2
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      tk_ui/station.py

+ 1 - 1
tk_ui/station.py

@@ -417,7 +417,7 @@ class GarbageStationBase(TkEventMain, metaclass=abc.ABCMeta):
                 category_score = category_score / name_score
                 if category_score > 1:
                     category_score = 1
-                category = f"垃圾类型为{category_} [可信度: {(category_score / name_score) * 100}%]"
+                category = f"垃圾类型为{category_} [可信度: {category_score * 100}%]"
             res_str += f"  NO.{i + 1} {name}\n  {category}\n"
         self.show_msg("搜索垃圾", res_str, show_time=30, big=True)