Fix argparser option

This commit is contained in:
Andreas Peldszus
2024-06-05 10:12:54 +02:00
parent ab17c4dbc6
commit 14077315ae
2 changed files with 6 additions and 7 deletions
+4 -5
View File
@@ -25,10 +25,9 @@ if __name__ == "__main__":
type=int,
default=1,
help="Number of threads to use for OpenMP")
parser.add_argument('--single_model', '-sm',
type=bool,
default=True,
help='Set to false if every connection should instantiate its own model. Only relevant for custom model, passed using -trt or -fw.')
parser.add_argument('--no_single_model', '-nsm',
action='store_true',
help='Set this if every connection should instantiate its own model. Only relevant for custom model, passed using -trt or -fw.')
args = parser.parse_args()
if args.backend == "tensorrt":
@@ -47,5 +46,5 @@ if __name__ == "__main__":
faster_whisper_custom_model_path=args.faster_whisper_custom_model_path,
whisper_tensorrt_path=args.trt_model_path,
trt_multilingual=args.trt_multilingual,
single_model=args.single_model,
single_model=not args.no_single_model,
)