1 min readJan 28, 2018
Your code does not seem to be using flow_from_directory(), which is what your question seems to be about.
You might want to predict the output on a single image or thousands of images — the code stays the same. Put all of your images inside a subdirectory of test directory, and use the test directory to create a data generator using ImageDataGenerator() (which you are doing in the snippet above) via flow_from_directory().
So, if you store your image at ../test/test/3.jpg, then pass ../test as the path to your folder to flow_from_directory().