-
Notifications
You must be signed in to change notification settings - Fork 1
/
CLImain.py
57 lines (52 loc) · 1.94 KB
/
CLImain.py
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
from sources.Utility import ClearTerminal
from sources.CLI.CLIParse import CLIParse
from sources.CLI.CLICivitai import CLICivitai
from sources.CLI.CLICreate import CLICreate
from sources.CLI.CLITrain import CLITrain
from sources.CLI.CLIEvaluate import CLIEvaluate
from sources.CLI.CLIGenerate import CLIGenerate
from sources.Completer import Completer
from sources.CompleteUtility import AddFunctions, mainCompleter
if __name__ == "__main__":
ClearTerminal()
completer = Completer()
AddFunctions(completer)
completer.SetCompleteFunction(mainCompleter)
operation = input(
"Main> Select an operation [parse|create|civitai|train|evaluate|generate|clear|cls|exit] : "
)
while True:
if operation == "parse":
cliParse = CLIParse(completer)
cliParse.Start()
operation = ""
elif operation == "clear" or operation == "cls":
ClearTerminal()
operation = ""
elif operation == "create":
cliCreate = CLICreate(completer)
cliCreate.Start()
operation = ""
elif operation == "civitai":
cliCivitai = CLICivitai(completer)
cliCivitai.Start()
operation = ""
elif operation == "train":
cliTrain = CLITrain()
cliTrain.Start()
operation = ""
elif operation == "evaluate":
cliEvaluate = CLIEvaluate()
cliEvaluate.Start()
operation = ""
elif operation == "exit":
exit(0)
elif operation == "generate":
cliGenerate = CLIGenerate(completer)
cliGenerate.Start()
operation = ""
else:
completer.SetCompleteFunction(mainCompleter)
operation = input(
"Main> Select an operation [parse|create|civitai|train|evaluate|generate|clear|cls|exit] : "
)