LING commited on
Commit
e171a3e
·
1 Parent(s): e1970ae

Correct Music2Emo provenance and licensing

Browse files
Files changed (6) hide show
  1. README.md +3 -0
  2. SOURCES.md +7 -3
  3. THIRD_PARTY_NOTICES.md +44 -0
  4. app.py +1 -1
  5. model.json +10 -3
  6. music2emo_runtime.py +1 -2
README.md CHANGED
@@ -18,3 +18,6 @@ returns categorical mood tags together with valence and arousal estimates.
18
  The deployment uses the official Music2Emo checkpoint and the MERT-v1-95M
19
  backbone. The MERT weights are licensed under CC BY-NC 4.0, so this Space is
20
  for non-commercial use.
 
 
 
 
18
  The deployment uses the official Music2Emo checkpoint and the MERT-v1-95M
19
  backbone. The MERT weights are licensed under CC BY-NC 4.0, so this Space is
20
  for non-commercial use.
21
+
22
+ Source attribution and third-party license details are recorded in
23
+ `SOURCES.md` and `THIRD_PARTY_NOTICES.md`.
SOURCES.md CHANGED
@@ -4,10 +4,12 @@
4
 
5
  - Paper: https://arxiv.org/abs/2502.03979
6
  - Source: https://github.com/AMAAI-Lab/Music2Emotion
7
- - Model files: https://huggingface.co/amaai-lab/music2emo
8
- - Pinned model revision:
 
9
  `b036e59471583c3d5b30c69e63e8c7323cc36c4a`
10
- - Code and Music2Emo checkpoint license: Apache-2.0
 
11
 
12
  ## MERT
13
 
@@ -23,3 +25,5 @@ multitask checkpoint to produce 56 mood probabilities and valence-arousal
23
  scores. The Space downloads source modules and weights from the pinned
24
  Music2Emo revision at runtime instead of committing a copy of the upstream
25
  repository.
 
 
 
4
 
5
  - Paper: https://arxiv.org/abs/2502.03979
6
  - Source: https://github.com/AMAAI-Lab/Music2Emotion
7
+ - Source license: MIT
8
+ - Model repository: https://huggingface.co/amaai-lab/music2emo
9
+ - Pinned model-repository revision:
10
  `b036e59471583c3d5b30c69e63e8c7323cc36c4a`
11
+ - Model-repository metadata license: Apache-2.0
12
+ - Checkpoint: `saved_models/J_all.ckpt`
13
 
14
  ## MERT
15
 
 
25
  scores. The Space downloads source modules and weights from the pinned
26
  Music2Emo revision at runtime instead of committing a copy of the upstream
27
  repository.
28
+
29
+ See `THIRD_PARTY_NOTICES.md` for copyright and license notices.
THIRD_PARTY_NOTICES.md ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Third-Party Notices
2
+
3
+ ## Music2Emo
4
+
5
+ The inference adapter is based on the Music2Emo project:
6
+
7
+ https://github.com/AMAAI-Lab/Music2Emotion
8
+
9
+ MIT License
10
+
11
+ Copyright (c) 2025 The Audio, Music, and AI (AMAAI) Lab
12
+
13
+ Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ of this software and associated documentation files (the "Software"), to deal
15
+ in the Software without restriction, including without limitation the rights
16
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ copies of the Software, and to permit persons to whom the Software is
18
+ furnished to do so, subject to the following conditions:
19
+
20
+ The above copyright notice and this permission notice shall be included in all
21
+ copies or substantial portions of the Software.
22
+
23
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
+ SOFTWARE.
30
+
31
+ The released checkpoint and runtime assets are obtained from:
32
+
33
+ https://huggingface.co/amaai-lab/music2emo
34
+
35
+ That model repository is marked Apache-2.0 in its Hugging Face metadata.
36
+
37
+ ## MERT
38
+
39
+ The deployment uses the MERT-v1-95M backbone:
40
+
41
+ https://huggingface.co/m-a-p/MERT-v1-95M
42
+
43
+ MERT-v1-95M is licensed under CC BY-NC 4.0. Its non-commercial restriction
44
+ applies to this deployment.
app.py CHANGED
@@ -21,9 +21,9 @@ except ImportError:
21
  return self.func(*args, **kwargs)
22
  return args[0]
23
 
24
- from music2emo_runtime import analyze_music
25
  from pyharp import ModelCard, build_endpoint
26
 
 
27
 
28
  MIN_AUDIO_SECONDS = 1
29
  MAX_AUDIO_SECONDS = 60
 
21
  return self.func(*args, **kwargs)
22
  return args[0]
23
 
 
24
  from pyharp import ModelCard, build_endpoint
25
 
26
+ from music2emo_runtime import analyze_music
27
 
28
  MIN_AUDIO_SECONDS = 1
29
  MAX_AUDIO_SECONDS = 60
model.json CHANGED
@@ -1,12 +1,19 @@
1
  {
2
  "name": "Music2Emo",
3
  "task": "Music emotion recognition",
4
- "source_repository": "AMAAI-Lab/Music2Emotion",
5
- "source_revision": "b036e59471583c3d5b30c69e63e8c7323cc36c4a",
6
- "source_license": "Apache-2.0",
 
 
 
 
 
 
7
  "checkpoint": {
8
  "repo": "amaai-lab/music2emo",
9
  "file": "saved_models/J_all.ckpt",
 
10
  "license": "Apache-2.0"
11
  },
12
  "backbone": {
 
1
  {
2
  "name": "Music2Emo",
3
  "task": "Music emotion recognition",
4
+ "source": {
5
+ "repo": "AMAAI-Lab/Music2Emotion",
6
+ "license": "MIT"
7
+ },
8
+ "runtime_assets": {
9
+ "repo": "amaai-lab/music2emo",
10
+ "revision": "b036e59471583c3d5b30c69e63e8c7323cc36c4a",
11
+ "license": "Apache-2.0"
12
+ },
13
  "checkpoint": {
14
  "repo": "amaai-lab/music2emo",
15
  "file": "saved_models/J_all.ckpt",
16
+ "revision": "b036e59471583c3d5b30c69e63e8c7323cc36c4a",
17
  "license": "Apache-2.0"
18
  },
19
  "backbone": {
music2emo_runtime.py CHANGED
@@ -10,13 +10,12 @@ import librosa
10
  import mir_eval
11
  import numpy as np
12
  import torch
13
- import torch.nn as nn
14
  import torchaudio
15
  from huggingface_hub import snapshot_download
16
  from music21 import note, stream
 
17
  from transformers import AutoModel, Wav2Vec2FeatureExtractor
18
 
19
-
20
  SOURCE_REPO = "amaai-lab/music2emo"
21
  SOURCE_REVISION = "b036e59471583c3d5b30c69e63e8c7323cc36c4a"
22
  MERT_REPO = "m-a-p/MERT-v1-95M"
 
10
  import mir_eval
11
  import numpy as np
12
  import torch
 
13
  import torchaudio
14
  from huggingface_hub import snapshot_download
15
  from music21 import note, stream
16
+ from torch import nn
17
  from transformers import AutoModel, Wav2Vec2FeatureExtractor
18
 
 
19
  SOURCE_REPO = "amaai-lab/music2emo"
20
  SOURCE_REVISION = "b036e59471583c3d5b30c69e63e8c7323cc36c4a"
21
  MERT_REPO = "m-a-p/MERT-v1-95M"