How to implement the trained model code on a "button "

since I m using PYQT for GUI ,I m wandering how to do code for a button that do " Apply CNN " .
How to implement trained CNN model over ui.py button .I m using PYQT .My second question is I m not sure that gui will work on single image or my dataset .How to do code for a button that do " Apply CNN " . Please give a easy demo or example that will be helpful.
thanks in advance

I think it really depends on your use case and how you would like your application to work.
Should the user provide a single image which will be processed or a whole bunch of images?
The “Apply CNN” button might just execute a small method which will e.g. classify the currently selected image etc.

What are you planning to do with the application?

i want to make GUI for the whole data set.including train or testing…

hi, the GUI is about the data or the model? you may provide more information like a use case.

The whole dataset gui will include : load data (as I first to train ) so There will be load
dataset button
2nd step : there will be split dataset in test and train .i m not sure
about creating buttons of both needed or not
3rd step :training the data I loaded .
against this I want to train the dataset
4th step : one the data is trainined message
pop up. That training is done . now test should be done Again i have to browse bunch of images for testing like 200 test images
Last step :
the result will include the same results that displayed on my cnn.py screen.
i just want to follow the same steps of my CNN in GUI.simple i want to make the GUI of cnn.

kindly share any source or info which helpful.
thanks