unitaryai / detoxify

Trained models & code to predict toxic comments on all 3 Jigsaw Toxic Comment Challenges. Built using ⚡ Pytorch Lightning and 🤗 Transformers. For access to our API, please email us at contact@unitary.ai.
https://www.unitary.ai/
Apache License 2.0
893 stars 115 forks source link

OSError: Unable to load vocabulary from file. Please check that the provided vocabulary is accessible and not corrupted. #106

Open SalatDressingOil opened 3 months ago

SalatDressingOil commented 3 months ago

I've been trying to set it up for several hours. I don't understand what's going on. I need a model that can work in Russian, of the ones presented here it is only "multilingual" and as by the law of meanness, it is she who does not work for me. 2024-04-16_18-08-14 2024-04-16_18-12-19 Thought that the problem might be in the broken loading of the model file. Rebooted it, both with a direct link taken from the source code, and by simple deletion and automatic download. Also deleted all the contents .cache\huggingface As you can see, this did not help in any way.

jamt9000 commented 2 months ago

It seems to be working for me. Could you try with a newer "transformers" version, such as transformers==4.40.2?

Jamess-MacBook-Pro-4:detoxify jamesthewlis$ python run_prediction.py --input 'example' --model multilingual
         toxicity  severe_toxicity  obscene  identity_attack   insult  threat  sexual_explicit
example   0.00029          0.00013  0.00099           0.0002  0.00076  0.0001          0.00007
Jamess-MacBook-Pro-4:detoxify jamesthewlis$ python run_prediction.py --input 'Иди на хуй' --model multilingual
            toxicity  severe_toxicity  obscene  identity_attack   insult   threat  sexual_explicit
Иди на хуй   0.99291          0.02102  0.21478          0.00607  0.15455  0.00785           0.7315