seungheondoh / lp-music-caps

LP-MusicCaps: LLM-Based Pseudo Music Captioning [ISMIR23]
https://huggingface.co/papers/2307.16372
268 stars 32 forks source link

Some bugs in the readme.md and caption.py #6

Closed feiyuehchen closed 9 months ago

feiyuehchen commented 11 months ago

Hi, I ran the following codes from the "Quick Start: Audio to Caption" in readme.md:

# or
cd lmpc/music_captioning 
wget https://huggingface.co/seungheondoh/lp-music-caps/resolve/main/transfer.pth -O exp/transfer/lp_music_caps
python captioning.py --audio_path ../../dataset/samples/orchestra.wav

Then I got some errors and tried to fix as below:

cd lpmc/music_captioning # lpmc instead of lmpc`
wget https://huggingface.co/seungheondoh/lp-music-caps/resolve/main/transfer.pth -O exp/transfer/lp_music_caps/last.pth # exp/transfer/lp_music_caps is a directory
python captioning.py --audio_path ../../dataset/samples/orchestra.wav # same

In Caption.py (also in other files if the sys path is not added):

# add the sys path before import files under lpmc
import sys
sys.path.append("../..")

from lpmc.music_captioning.model.bart import BartCaptionModel

This is a great project and is easy to use. I strongly appreciate the project and hope my fixes could help.

seungheondoh commented 9 months ago

Thanks! Fixed.