Created
April 14, 2022 09:30
-
-
Save Chuttyboy/f9835d43d6e336b7f078f3267d0d35a3 to your computer and use it in GitHub Desktop.
Give priority status to Human activity detection objects ( color coding )
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| with open('output_test.txt','r') as file: | |
| data = file.readlines() | |
| for a in range(len(data)): | |
| if 'person' in data[a] and 'tv' in data[a]: | |
| data[a] = data[a].replace('\n','') + ' status : Low\n' | |
| else: | |
| data[a] = data[a] + ' status : High\n' | |
| with open('outputs.txt','w') as file: | |
| file.writelines(data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment