<｜begin▁of▁sentence｜>### Instruction:
Given the Coauthorships in network science Graph which you can read from a gml file named 'netscience.gml', can you use the `louvain` function from `cdlib` to perform community detection and compute the average fraction of edges of a node of a community that point outside the community itself?
### Response:
import networkx as nx
from cdlib import algorithms, evaluation

# Create a graph from a gml file
G = nx.read_gml('netscience.gml')

# Apply a community detection algorithm
communities = algorithms.louvain(G)

# Compute the average fraction of edges of a node of a community that point outside the community
avg_out_degree_fraction = evaluation.avg_odf(G, communities)

print(avg_out_degree_fraction)
<|EOT|>
