<commit_before>from django.contrib.auth.models import User
from player.models import Album, Song
from rest_framework import serializers


class UserSerializer(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = User
        fields = ('id', 'url', 'username', 'email', 'groups')


class AlbumSerializer(serializers.HyperlinkedModelSerializer):
    songs = serializers.PrimaryKeyRelatedField(many=True, read_only=True)
    class Meta:
        model = Album
        fields = ('id', 'name', 'author', 'release_date', 'songs')

class SongSerializer(serializers.ModelSerializer):
    album= serializers.CharField(read_only=True)
    class Meta:
        model = Song
        fields = ('id', 'name','album', 'change_date', 'audio_file')
<commit_msg>serializer.py<commit_after>from django.contrib.auth.models import User
from player.models import Album, Song
from rest_framework import serializers


class UserSerializer(serializers.ModelSerializer):
    class Meta:
        model = User
        fields = ('id', 'url', 'username', 'email', 'groups')


class AlbumSerializer(serializers.ModelSerializer):
    songs = serializers.PrimaryKeyRelatedField(many=True, read_only=True)
    class Meta:
        model = Album
        fields = ('id', 'name', 'author', 'release_date', 'songs')

class SongSerializer(serializers.ModelSerializer):
    album = serializers.CharField(read_only=True)
    class Meta:
        model = Song
        fields = ('id', 'name','album', 'change_date', 'audio_file')

{'fraction_non_alphanumeric': 0.11909514304723885, 'fraction_numerical': 0.0, 'mean_word_length': 4.2404181184668985, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1532751', 'n_tokens_mistral': 422, 'n_tokens_neox': 415, 'n_words': 106}