import models
import run_model
import os
import pandas as pd

fns = pd.Series(os.listdir('/nfs/NASDELL/SABIOD/SITE/SPHYRNA/2019/wavs/S70/'))
fns = fns[((fns>'S70_20200506_043')&(fns<'S70_20200506_19'))]
all = fns
fns = pd.Series(os.listdir('/nfs/NASDELL/SABIOD/SITE/SPHYRNA/2019/wavs/S55/'))
fns = fns[((fns>'S55_20200506_043')&(fns<'S55_20200506_19'))]
all = all.append(fns)
all[all.str.startswith('S70')] = '/S70/' + all[all.str.startswith('S70')]
all[all.str.startswith('S55')] = '/S55/' + all[all.str.startswith('S55')]

fns = fns[:5]

m = models.get['stft_depthwise'](64)
preds = run_model.run(list(all), 'models/stft_depthwise_64_r0.stdc', m, folder="/nfs/NASDELL/SABIOD/SITE/SPHYRNA/2019/wavs", nopool=False)
print(preds)
preds.to_pickle('sphyrna_20200506_stft_depthwise_64_r0.preds')
