-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
30 lines (22 loc) · 833 Bytes
/
main.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
from mind_map_creator import MindMapCreator
from mind_map_visualizer import MindMapVisualizer
from data_manager import WikipediaDataManager
from logger import Logger, log_function_call, get_logger
logger = get_logger("mind_map")
@log_function_call(logger)
def main():
data_manager = WikipediaDataManager()
start_topic = "Artificial Intelligence"
creator = MindMapCreator(data_manager, logger)
try:
graph = creator.create_mind_map(start_topic)
except Exception as e:
logger.error(f"Error creating mind map: {str(e)}")
return
visualizer = MindMapVisualizer(logger)
try:
visualizer.visualize_mind_map(graph, start_topic)
except Exception as e:
logger.error(f"Error visualizing mind map: {str(e)}")
if __name__ == "__main__":
main()