made cli work with new interface

This commit is contained in:
Jaikinator
2024-01-25 16:08:53 +01:00
parent c65dc51541
commit ef7bd6e15c
3 changed files with 100 additions and 49 deletions
+28
View File
@@ -0,0 +1,28 @@
"""
This script is used to start the Gradio interface for audio transcription.
A configuration file can be passed to the script to configure the interface.
If no configuration file is passed, the default configuration is used.
The main Reason for this script is to allow the use of multiprocessing in the app.
"""
import multiprocessing
from scraibe.misc import ParseKwargs
from argparse import ArgumentParser
parser = ArgumentParser()
parser.add_argument("--server-config", type=str, default= None,
help="Path to the configy.yml file.")
parser.add_argument('--server-kwargs', nargs='*', action=ParseKwargs, default={},
help='Keyword arguments for the Gradio app.')
args = parser.parse_args()
if __name__ == '__main__':
multiprocessing.set_start_method('spawn')
from scraibe.app.app import app
app(config = args.server_config, **args.server_kwargs)