-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtool.py
More file actions
53 lines (39 loc) · 1.6 KB
/
tool.py
File metadata and controls
53 lines (39 loc) · 1.6 KB
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
import sys
import pyfiglet
from colorama import Style, Fore, init
# from src.DriveRLR import scenario_mutation, LLM_evaluation, RR_analysis
from DriveRLR import scenario_mutation, LLM_evaluation, RR_analysis
MODULES = {
"1": ("Scenario Mutation", scenario_mutation),
"2": ("LLM Evaluation", LLM_evaluation),
"3": ("Realism and Robustness Analysis", RR_analysis),
}
init(autoreset=True)
def print_logo():
logo = pyfiglet.figlet_format("DriveRLR", font="slant")
print(Fore.CYAN + logo + Style.RESET_ALL + Fore.GREEN + "=" * 60 + Style.RESET_ALL)
print(Fore.YELLOW + "Welcome to DriveRLR TOOL - Interactive Command Line Utility" + Style.RESET_ALL)
print(Fore.GREEN + "=" * 60 + Style.RESET_ALL)
def show_main_menu():
print("\n=== MAIN MENU ===")
for key, (name, _) in MODULES.items():
print(f"{key}. {name}")
print("q. Quit")
print("=================")
def main():
print_logo()
while True:
show_main_menu()
choice = input("Enter your choice: ").strip().lower()
if choice in ["q", "quit", "exit"]:
print(Fore.YELLOW + "\nExiting DriveRLR TOOL. Goodbye!" + Style.RESET_ALL)
sys.exit(0)
if choice in MODULES:
module_name, module_func = MODULES[choice]
print(Fore.MAGENTA + f"\n>>> Starting {module_name} <<<" + Style.RESET_ALL)
module_func()
print(Fore.GREEN + f"<<< Finished {module_name} >>>\n" + Style.RESET_ALL)
else:
print(Fore.RED + "Invalid choice! Please select a valid option." + Style.RESET_ALL)
if __name__ == "__main__":
main()