Spaces:
Sleeping
Sleeping
Update model_wrapper/fasttext_wrapper.py
Browse files
model_wrapper/fasttext_wrapper.py
CHANGED
@@ -7,4 +7,5 @@ class FasttextWrapper(object):
|
|
7 |
self.model = fasttext.load_model(FasttextWrapper.MODEL_PATH)
|
8 |
|
9 |
def __call__(self, text: str) -> str:
|
10 |
-
|
|
|
|
7 |
self.model = fasttext.load_model(FasttextWrapper.MODEL_PATH)
|
8 |
|
9 |
def __call__(self, text: str) -> str:
|
10 |
+
label, prob=self.model.predict(text)
|
11 |
+
return label[0],prob
|