修改按钮识别率

This commit is contained in:
whong
2024-08-11 13:27:13 +08:00
parent c7835f3de1
commit 522169fff9
2 changed files with 2 additions and 2 deletions

2
bot.py
View File

@@ -31,7 +31,7 @@ class WowBot:
# drop all keys that are not in the valid keys list
key_text = [key for key in key_text if (key >= '0' and key <= 'z')]
key_text = ''.join(key_text)
if len(key_text) > 0 and len(key_text) <= 2:
if len(key_text) == 1:
return key_text[0]
else:
return ''

View File

@@ -38,7 +38,7 @@ class Vision:
if config.DEBUG:
print('raw output: ', raw_output)
# ('100', [['1', '0', '0', '[E]'], ['0.3', '0.4', '0.3', '0.4']])
if float(conf[0]) >= 0.7:
if float(conf[0]) >= 0.8:
return label[0]
else:
return ''