mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Refa: drop useless fasttext (#5470)
### What problem does this PR solve? This patch drop useless fastext which is seems useless in the code base and its very kind of hard install should close #4498 ### Type of change - [x] Refactoring Signed-off-by: yihong0618 <zouzou0208@gmail.com>
This commit is contained in:
@ -145,18 +145,6 @@ class ToCHWImage(object):
|
||||
return data
|
||||
|
||||
|
||||
class Fasttext(object):
|
||||
def __init__(self, path="None", **kwargs):
|
||||
import fasttext
|
||||
self.fast_model = fasttext.load_model(path)
|
||||
|
||||
def __call__(self, data):
|
||||
label = data['label']
|
||||
fast_label = self.fast_model[label]
|
||||
data['fast_label'] = fast_label
|
||||
return data
|
||||
|
||||
|
||||
class KeepKeys(object):
|
||||
def __init__(self, keep_keys, **kwargs):
|
||||
self.keep_keys = keep_keys
|
||||
|
||||
Reference in New Issue
Block a user