A newer version of the Gradio SDK is available:
5.23.3
In this example, we tune the hyperparameters of a particular classifier using a RandomizedSearchCV. For a demo on the performance of some other classifiers, see the Classification of text documents using sparse features notebook.