mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-02-04 01:25:07 +08:00
Compare commits
2 Commits
a23a0f230c
...
341a7b1473
| Author | SHA1 | Date | |
|---|---|---|---|
| 341a7b1473 | |||
| c29c395390 |
@ -351,7 +351,8 @@ class TextRecognizer:
|
||||
def close(self):
|
||||
# close session and release manually
|
||||
logging.info('Close TextRecognizer.')
|
||||
del self.predictor
|
||||
if hasattr(self, "predictor"):
|
||||
del self.predictor
|
||||
gc.collect()
|
||||
|
||||
def __call__(self, img_list):
|
||||
@ -490,7 +491,8 @@ class TextDetector:
|
||||
|
||||
def close(self):
|
||||
logging.info("Close TextDetector.")
|
||||
del self.predictor
|
||||
if hasattr(self, "predictor"):
|
||||
del self.predictor
|
||||
gc.collect()
|
||||
|
||||
def __call__(self, img):
|
||||
|
||||
@ -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):
|
||||
|
||||
@ -155,7 +155,12 @@ export const useComposeLlmOptionsByModelTypes = (
|
||||
options.forEach((x) => {
|
||||
const item = pre.find((y) => y.label === x.label);
|
||||
if (item) {
|
||||
item.options.push(...x.options);
|
||||
x.options.forEach((y) => {
|
||||
// A model that is both an image2text and speech2text model
|
||||
if (!item.options.some((z) => z.value === y.value)) {
|
||||
item.options.push(y);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
pre.push(x);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user