"soft" or "default"), or will attempt to load a theme from the Hugging Face Hub (e.g. If a string, will look for a built-in theme with that name (e.g. String path or url to image to use as display image when the web demo is shared on social media.Ī Theme object or a string representing a theme. If it is an HTTP(S) link to a downloadable remote file, the content of this file is displayed. 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. Whether the interface should automatically rerun if any of the inputs change.Ī title for the interface if provided, appears above the input and output components in large font. If examples are provided, how many to display per page. The default option in HuggingFace Spaces is True. 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 | Component | 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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |