

Only applies if allow_flagging is "manual". If provided, allows user to select from the list of options when flagging. This parameter can be set with environmental variable GRADIO_ALLOW_FLAGGING otherwise defaults to "manual".

If "manual", both the input and outputs are flagged when the user clicks flag button. If "auto", every input the user submits will be automatically flagged (outputs are not flagged). If "manual", users will see a button to flag. If "never" or "auto", users will not see a button to flag an input and output. Path or url to image to use as display image when the web demo is shared on social media.Ĭustom css or path to custom css file to use with interface. Accepts Markdown and HTML content.Īn expanded article explaining the interface if provided, appears below the input and output components in regular font. Also used as the tab title when opened in a browser window.Ī description for the interface if provided, appears above the input and output components and beneath the title in regular font. Only applies if interpretation is "shap".Ī title for the interface if provided, appears above the input and output components in large font. 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.
#Batch file rename files in subdirectorys generator#
If `fn` is a generator function, then the last yielded value will be used as the output. 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.
