![]() Increasing this value will increase shap runtime, but improve results. For more information on the different interpretation methods, see the Advanced Interface Features guide.Ī multiplier that determines how many examples are computed for shap-based interpretation. ![]() Pass "default" to use simple built-in interpreter, "shap" to use a built-in shapley-based interpreter, or your own custom interpretation function. Whether the interface should automatically rerun if any of the inputs change.įunction that provides interpretation explaining prediction output. If examples are provided, how many to display per page. The default option in HuggingFace Spaces is True. If True, caches examples in the server for fast runtime in examples. If there are multiple input components and a directory is provided, a log.csv file must be present in the directory to link corresponding inputs. A string path to a directory of examples can also be provided, but it should be within the directory with the python file running the gradio app. Should be nested list, in which the outer list consists of samples and each inner list consists of an input corresponding to each input component. Sample inputs for the function if provided, appear below the UI components and can be clicked to populate the interface. If set to None, then only the input components will be displayed. The number of output components should match the number of values returned by fn. Components can either be passed as instantiated objects, or referred to by their string shortcuts. If set to None, then only the output components will be displayed.Ī single Gradio component, or list of Gradio components. ![]() The number of input components should match the number of parameters in fn. Str | IOComponent | list | NoneĪ single Gradio component, or list of Gradio components. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component. Often a machine learning model's prediction function. The function to wrap an interface around. Demo = gr.Interface(fn=image_classifier, inputs="image", outputs="label")
0 Comments
Leave a Reply. |