11 lines
449 B
Python
11 lines
449 B
Python
|
# stworz format pliku wyjsciowego
|
||
|
for d in 'dev-0', 'test-A':
|
||
|
with open(f'../../{d}/in.tsv') as f_in, open(f'../../{d}/out.tsv','w') as f_out:
|
||
|
for line in f_in:
|
||
|
pred_path = 'predictions/dev-0/labels/' + line.rstrip().replace('jpg','txt') + '-nonrelative'
|
||
|
try:
|
||
|
s = open(pred_path).read()
|
||
|
f_out.write(s + '\n')
|
||
|
except FileNotFoundError:
|
||
|
f_out.write('\n')
|