<｜begin▁of▁sentence｜>### Instruction:
Given the High-energy theory collaborations graph which you can read from a gml file named hep-th.gml, can you use the Louvain method in cdlib to perform community detection and compute the Newman-Girvan modularity?
### Response:
import networkx as nx
from cdlib import algorithms, evaluation

# Load the high-energy theory collaborations graph
G = nx.read_gml('high-energy-theory-collaborations/hep-th.gml')

# Perform community detection using the Louvain method
communities = algorithms.louvain(G)

# Calculate the Newman-Girvan modularity of the detected communities
mod = evaluation.newman_girvan_modularity(G, communities)

# Print the Newman-Girvan modularity value
print('Newman-Girvan Modularity:', mod.score)
<|EOT|>
