Adding .txt support via TextDisplayComponent - #433
Conversation
2cylu2
left a comment
There was a problem hiding this comment.
I built the PR locally and tested with teamup-tech/cacophony as an example model since it outputs a .txt file, but the text display wasn't rendering for me even after rebuilding it multiple times. Are there any additional steps or specific PyHARP branch requirements needed to get the TextDisplayComponent to render? I attached a screenshot of what I'm seeing.
I also noticed a few other points:
- Since TextDisplayComponent inherits from MediaDisplayComponent, the Play/Stop button and horizontal scrollbar are still displayed for text files. Would it make sense to hide/disable these controls for TextDisplayComponent since text files aren't playable audio?
- Since this PR updates the pyharp submodule, do we expect the corresponding HarpTextTrack changes to be merged and published in PyHARP separately so that external models can use it?
- There are currently merge conflicts in pyharp and src/utils/Controls.h with main that will need to be resolved. Should we resolve these as part of this PR, or check with the team first on how they should be handled?
…ay-component # Conflicts: # pyharp # src/utils/Controls.h
|
Yess. My bad. The pyharp submodule needs the commit with HarpTextTrack. git submodule update should pull it. I've also requested on the pyharp PR. Also, beware that FST-AI Music Detection model (and most models I've deployed) are pinned to the develop branch for pyharp. Manually pointing to that pyharp branch and running app.py locally may be the best bet. That's why even the screenshot I attached, you can see the local link at the top. I also found a problem in Cacophony's base code. Any text-outputting model should have file_types=[".txt"] in gr.File(). Kinda like .midi or .mid. Fixed that. So now it should work. Thanks to your review, I also removed play/stop button and horizontal scroll bar! |
This is what is looks like for me! Tested with extra lines to show that scrollability works too.