Rnn_Amharic_Hate_Detector / textclassifier.py
rio3210's picture
Add initial implementation of text classification API with Docker support
01ad777
raw
history blame contribute delete
250 Bytes
class TextClassifier:
def __init__(self, model) -> None:
self.text_classifier = model
def classify(self,text):
data = self.text_classifier(text)[0]
print("response from hugging \n", data)
return data