mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Fix: judge not empty before delete (#10099)
### What problem does this PR solve? judge not empty before delete session. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -408,7 +408,8 @@ class Recognizer:
|
||||
|
||||
def close(self):
|
||||
logging.info("Close recognizer.")
|
||||
del self.ort_sess
|
||||
if hasattr(self, "ort_sess"):
|
||||
del self.ort_sess
|
||||
gc.collect()
|
||||
|
||||
def __call__(self, image_list, thr=0.7, batch_size=16):
|
||||
|
||||
Reference in New Issue
Block a user