-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathrunner.py
More file actions
26 lines (21 loc) · 761 Bytes
/
runner.py
File metadata and controls
26 lines (21 loc) · 761 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import argparse
from core.main import Main
def _get_args():
parser = argparse.ArgumentParser(
description='Calculates distances between a dataset of audio files',
formatter_class=argparse.ArgumentDefaultsHelpFormatter
)
parser.add_argument("in_path",
action="store",
help="Name of database")
args = parser.parse_args()
return args.in_path
if __name__ == '__main__':
print('######################################')
db_name = _get_args()
if not db_name.endswith('.sqlite'):
print('Provide a proper database file name. (for eg: db.sqlite)')
else:
main_obj = Main(db_name)
main_obj.calc_feature_new()
main_obj.show_similarity()