I use resnet50 to extract features from the images, the code works well as a separate py file. however, when i converted it to a flask api, the code is stuck, I had to manua