ottokart / punctuator2

A bidirectional recurrent neural network model with attention mechanism for restoring missing punctuation in unsegmented text
http://bark.phon.ioc.ee/punctuator
MIT License
657 stars 195 forks source link

Model files not found #83

Closed bacloud23 closed 1 year ago

bacloud23 commented 1 year ago

Hi, Thanks a lot for providing this genius AI.

After a long way through Theano installation on my environment, I hope I'm just one step away.

So after downloading three files from the provided link, It looks like punctuator2 couldn't make use of them.

This is the exact output error

root@c5dc91103018:/usr/src/app/spawner# python ./puctuator-wrapper.py WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions. Traceback (most recent call last): File "./puctuator-wrapper.py", line 2, in p = Punctuator('model.pcl') File "/usr/local/lib/python3.8/site-packages/punctuator/punc.py", line 179, in init assert model_file, 'Model %s does not exist.' % model_file AssertionError: Model None does not exist.

The models do exist though !

root@c5dc91103018:/usr/src/app/spawner# cd $PUNCTUATOR_DATA_DIR root@c5dc91103018:/opt/punctuator# ls Demo-Europarl-EN.pcl INTERSPEECH-T-BRNN-pre.pcl INTERSPEECH-T-BRNN.pcl

Thanks a lot !

bacloud23 commented 1 year ago

my bad, it is under my eyes, I just changed the file name in the python script and it works. However very very slowly ?!

Edit: well al is fine, it just takes time to load the model , then calling the same function is fast enough.

I cannot thank you enough !