-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
31 lines (25 loc) · 939 Bytes
/
main.py
File metadata and controls
31 lines (25 loc) · 939 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
import subprocess
import sys
import os
def main():
tasks = {
"1": ("Chat (Enter exit to stop)", "task_1/chat.py"),
"2": ("RAG QA (Enter exit to stop)", "task_2/rag_qa.py"),
"3": ("Planning Agent (Enter exit to stop)", "task_3/agent.py"),
"4": ("Coding Assistant (Enter exit to stop)", "task_4/coding_assistant.py"),
"5": ("RAGAS Eval", "task_2/ragas_eval.py"),
"6": ("Load Document", "task_2/load_document.py"),
}
print("Select a task:")
for key, (name, filename) in tasks.items():
print(f" {key}. {name}")
choice = input("\nEnter number: ").strip()
if choice in tasks:
file, filename = tasks[choice]
env = os.environ.copy()
env["PYTHONPATH"] = os.path.dirname(os.path.abspath(__file__))
subprocess.run([sys.executable, filename], env=env)
else:
print("Invalid choice.")
if __name__ == "__main__":
main()