mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-05-04 12:24:52 +00:00
Add offline parameter
Offline usage is possible after initializing and downloading of models
This commit is contained in:
parent
3156761037
commit
42267eb8db
13 changed files with 78 additions and 11 deletions
|
@ -25,6 +25,8 @@ def main():
|
|||
help='Set frontend default language - target (%(default)s)')
|
||||
parser.add_argument('--frontend-timeout', type=int, default=500, metavar="<milliseconds>",
|
||||
help='Set frontend translation timeout (%(default)s)')
|
||||
parser.add_argument('--offline', default=False, action="store_true",
|
||||
help="Use offline")
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
|
@ -35,7 +37,8 @@ def main():
|
|||
debug=args.debug,
|
||||
frontend_language_source=args.frontend_language_source,
|
||||
frontend_language_target=args.frontend_language_target,
|
||||
frontend_timeout=args.frontend_timeout)
|
||||
frontend_timeout=args.frontend_timeout,
|
||||
offline=args.offline)
|
||||
if args.debug:
|
||||
app.run(host=args.host, port=args.port)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue