Epsilon617 commited on
Commit
3462d76
1 Parent(s): 4f25f2b

update description

Browse files
Files changed (3) hide show
  1. README.md +28 -1
  2. __pycache__/app.cpython-310.pyc +0 -0
  3. app.py +12 -1
README.md CHANGED
@@ -10,4 +10,31 @@ pinned: true
10
  license: cc-by-nc-4.0
11
  ---
12
 
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  license: cc-by-nc-4.0
11
  ---
12
 
13
+ <!-- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference -->
14
+
15
+ # Demo Introduction
16
+ This is an example of using the [MERT-v1-95M](https://huggingface.co/m-a-p/MERT-v1-95M) model as backbone to conduct multiple music understanding tasks with the universal represenation.
17
+
18
+ The tasks include EMO, GS, MTGInstrument, MTGGenre, MTGTop50, MTGMood, NSynthI, NSynthP, VocalSetS, VocalSetT.
19
+
20
+ More models can be referred at the [map organization page](https://huggingface.co/m-a-p).
21
+
22
+ # Known Issues
23
+
24
+ ## Audio Format Support
25
+
26
+ Theorectically, all the audio formats supported by [torchaudio.load()](https://pytorch.org/audio/stable/torchaudio.html#torchaudio.load) can be used in the demo. Theese should include but not limited to `WAV, AMB, MP3, FLAC`.
27
+
28
+ ## Error Output
29
+
30
+ Due the **hardware limitation** of the machine hosting our demospecification (2 CPU and 16GB RAM), there might be `Error` output when uploading long audios.
31
+
32
+ Unfortunately, we couldn't fix this in a short time since our team are all volunteer researchers.
33
+
34
+ We recommend to test audios less than 30 seconds or using the live mode if you are trying the [Music Descriptor demo](https://huggingface.co/spaces/m-a-p/Music-Descriptor) hosted online at HuggingFace Space.
35
+
36
+ This issue is expected to solve in the future by applying more community-support GPU resources or using other audio encoding strategy.
37
+
38
+ In the current stage, if you want to directly run the demo with longer audios, you could:
39
+ * clone this space `git clone https://huggingface.co/spaces/m-a-p/Music-Descriptor` and deploy the demo on your own machine with higher performance following the [official instruction](https://huggingface.co/docs/hub/spaces). The code will automatically use GPU for inference if there is GPU that can be detected by `torch.cuda.is_available()`.
40
+ * develop your own application with the MERT models if you have the experience of machine learning.
__pycache__/app.cpython-310.pyc CHANGED
Binary files a/__pycache__/app.cpython-310.pyc and b/__pycache__/app.cpython-310.pyc differ
 
app.py CHANGED
@@ -42,7 +42,18 @@ live_inputs = [
42
 
43
  title = "One Model for All Music Understanding Tasks"
44
  description = "An example of using the [MERT-v1-95M](https://huggingface.co/m-a-p/MERT-v1-95M) model as backbone to conduct multiple music understanding tasks with the universal represenation."
45
- article = "The tasks include EMO, GS, MTGInstrument, MTGGenre, MTGTop50, MTGMood, NSynthI, NSynthP, VocalSetS, VocalSetT. \n\n More models can be referred at the [map organization page](https://huggingface.co/m-a-p)."
 
 
 
 
 
 
 
 
 
 
 
46
  audio_examples = [
47
  # ["input/example-1.wav"],
48
  # ["input/example-2.wav"],
 
42
 
43
  title = "One Model for All Music Understanding Tasks"
44
  description = "An example of using the [MERT-v1-95M](https://huggingface.co/m-a-p/MERT-v1-95M) model as backbone to conduct multiple music understanding tasks with the universal represenation."
45
+ # article = "The tasks include EMO, GS, MTGInstrument, MTGGenre, MTGTop50, MTGMood, NSynthI, NSynthP, VocalSetS, VocalSetT. \n\n More models can be referred at the [map organization page](https://huggingface.co/m-a-p)."
46
+ with open('./README.md', 'r') as f:
47
+ # skip the header
48
+ header_count = 0
49
+ for line in f:
50
+ if '---' in line:
51
+ header_count += 1
52
+ if header_count >= 2:
53
+ break
54
+ # read the rest conent
55
+ article = f.read()
56
+
57
  audio_examples = [
58
  # ["input/example-1.wav"],
59
  # ["input/example-2.wav"],