analysis on all possible files in a provided directory, writes to JSON

This commit is contained in:
Mikayla Dobson
2023-01-04 22:09:25 -06:00
parent 8ce90346d9
commit 9510e36e45
4 changed files with 64 additions and 5 deletions

24
readresult.py Normal file
View File

@@ -0,0 +1,24 @@
import sys, json
path = sys.argv[1]
with open(path) as file:
contents = json.load(file)
for line in contents:
prediction = line['prediction']
for section in prediction:
for guess in section:
if (float(guess[2]) > 0.75):
print(line['path'])
print("Probable match: " + guess[1])
print(guess)
print("\n")
elif (float(guess[2]) > 0.3):
print(line['path'])
print("Potential match: " + guess[1])
print(guess)
print("\n")
# else:
# print(line['path'] + ": inconclusive")
# print("\n")