forked from ducngg/v7
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain_app.py
More file actions
35 lines (29 loc) · 903 Bytes
/
main_app.py
File metadata and controls
35 lines (29 loc) · 903 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
27
28
29
30
31
32
33
34
35
"""
Run this for the app that you can type in (stable, but can only use v7 in the app)
"""
import time
import sys, os
from PyQt5.QtWidgets import QApplication
from app.app import V7App
from app.args import parse_args
from utils.path import resource_path
os.makedirs(resource_path("history"), exist_ok=True)
if __name__ == '__main__':
args, input_agent_args = parse_args()
session = str(time.time())
if args.ai:
from imethod.v7ai import AIInputMethod
inputAgent = AIInputMethod(**input_agent_args)
else:
from imethod.v7 import InputMethod
inputAgent = InputMethod(**input_agent_args)
app = QApplication(sys.argv)
run_app = V7App(
verbose=args.verbose,
minimal=args.minimal,
size=args.size,
lang=args.lang,
inputAgent=inputAgent,
session=session
)
sys.exit(app.exec_())