I think the overall structure of your answer is great. However, I think there are some bugs and inconsistencies.
For example, why did you only implement a dummy method for extracting locations?
I also think that you can not just pass a string to the model and get out a string. Typically, there is meta data attached, which would use a dictionary instead.
spam lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor creativity violence