Download scripts/dev/3.6_test_visualisations.py from SlappAI/Singularity: direct link, hf CLI and curl.
- Browser
- Download file 702 Bytes
-
https://huggingface.co/SlappAI/Singularity/resolve/c8aa03645367f13b28133e72d9204fa09654b00a/scripts/dev/3.6_test_visualisations.py
- Command line
-
hf download hf://SlappAI/Singularity@c8aa03645367f13b28133e72d9204fa09654b00a/scripts/dev/3.6_test_visualisations.py
-
curl -L -o 3.6_test_visualisations.py https://huggingface.co/SlappAI/Singularity/resolve/c8aa03645367f13b28133e72d9204fa09654b00a/scripts/dev/3.6_test_visualisations.py
702 Bytes
| # test_script.py | |
| import os | |
| import sys | |
| sys.path.append(os.path.join(os.path.dirname(__file__), "../")) | |
| from app.services.agn_service.build_graph import build_graph | |
| from app.services.agn_service.visualize_graph import visualize_graph | |
| # Define paths | |
| graph_file = "graphs/healthcare.json" # Update this to your actual graph file path | |
| output_image = "test_graph_visualization.png" | |
| # Step 1: Build the graph | |
| G = build_graph(graph_file) # This function should return the graph object | |
| # Step 2: Generate and save the graph visualization | |
| if G: | |
| visualize_graph(G, output_file=output_image) | |
| print(f"Graph visualization generated and saved as {output_image}") | |
| else: | |
| print("Failed to build graph.") |