Tensor is not an element of this graph

i’m facing a problem with TF and Django.
my code is:

modelSavePathName = os.path.join(data_dir, f'detector_26082021_2111.h5')
detector.model.load_weights(modelSavePathName, by_name=True)
modelSavePathName = os.path.join(data_dir, f'recognizer_27082021_0846.h5')
recognizer.model.load_weights(modelSavePathName, by_name=True)
pipeline = keras_ocr.pipeline.Pipeline(detector=detector, recognizer=recognizer, max_size=4096)
imagesDF = keras_ocr.tools.read(img)
pr = pipeline.recognize(images=[imagesDF ])[0]

when i call pipeline.recognize(images=[imagesDF ])[0] localy it works. but when i call it in Django view i get this error:

ValueError at /

Tensor Tensor(“conv_cls.8_1/BiasAdd:0”, shape=(None, None, None, 2), dtype=float32) is not an element of this graph.

can anyone help me please, I’m desperate.
best regards

Why you don’t try to serve your model: