<｜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 and Leiden algorithms in cdlib to perform community detection? Can you then compute the Normalized F1 score to compare the two resulting community structures?
### Response:
import networkx as nx
from cdlib import algorithms, evaluation

# Read the graph
G = nx.read_gml('hep-th.gml')

# Detect communities using two different algorithms
louvain_communities = algorithms.louvain(G)
leiden_communities = algorithms.leiden(G)

# Compute the Normalized F1 score between the two community detections
nf1_score = evaluation.nf1(louvain_communities, leiden_communities)

# Print the Normalized F1 score
print('Normalized F1 score:', nf1_score.score)
<|EOT|>
