Spaces:
Running
on
T4
Fix Resource averaged_perceptron_tagger_eng not found when cloning and reinitializing the space
NTLK package is used by G2p package. During duplicating the space and reinitializing, there was file missing which results in crash during speech streaming.
It will not output any translation text and red box with error that you should check browser console will be displayed. In browser console the following error is displayed.
I reproduced it also on localhost and I'm providing a fix.
Resource averaged_perceptron_tagger_eng not found.
Please use the NLTK Downloader to obtain the resource:
import nltk
nltk.download('averaged_perceptron_tagger_eng')
For more information see: https://www.nltk.org/data.html
Attempted to load taggers/averaged_perceptron_tagger_eng/
Searched in:
- '/home/user/nltk_data'
- '/home/user/.pyenv/versions/3.10.12/nltk_data'
- '/home/user/.pyenv/versions/3.10.12/share/nltk_data'
- '/home/user/.pyenv/versions/3.10.12/lib/nltk_data'
- '/usr/share/nltk_data'
- '/usr/local/share/nltk_data'
- '/usr/lib/nltk_data'
- '/usr/local/lib/nltk_data'