1
0
mirror of https://github.com/QData/TextAttack.git synced 2021-10-13 00:05:06 +03:00
Files
textattack-nlp-transformer/textattack/__main__.py
2020-05-01 11:26:38 -04:00

21 lines
515 B
Python

#!/usr/bin/env python
"""
The TextAttack main module:
A command line parser to run an attack from user specifications.
"""
from textattack.shared.scripts.run_attack_args_helper import get_args
from textattack.shared.scripts.run_attack_parallel import run as run_parallel
from textattack.shared.scripts.run_attack_single_threaded import run as run_single_threaded
if __name__ == '__main__':
args = get_args()
if args.parallel:
run_parallel(args)
else:
run_single_threaded(args)