Open MarcSkovMadsen opened 2 years ago
Gradio takes the approach of annotating your model with input widgets. From the input widgets the parameter types are inferred. That is the opposite of what Param/ Panel does.
Yes, that does sound backwards; a given model might or might not need widgets, but it always has parameters, so inferring parameters from widgets seems odd.
Image Video Audio
It seems to me that Image, Video, and Audio are underspecified; there can be many such objects, with as far as I know no standard Python representation or type. But it does seem like they are useful types to support, as long as (a) they avoid adding dependencies by using inline imports like in param.DataFrame, (b) they have corresponding widgets in a library like Panel that makes it clear how they could be specified by a user, and (c) they have some usable Python type that is appropriate to work with. So to add them to Param, I'd want to see a full application using them (even if it's fairly trivial) that connects the docs and thus pins down aspects of the behavior that are otherwise unconstrained.
File
Here you're making a distinction between a file and a filename or path, given that filenames are already supported? Presumably this is a Python file object? If so, sure, particularly if an HTML file requestor can return not just the name but the underlying object.
TimeSeries
Is this a subtype of param.DataFrame
where the index is known to be time? If so, that seems fine as a subclass of param.DataFrame
.
Context
I have been trying to understand why I don't see a lot of adoption of Param and Panel for Machine Learning and AI.
I have looked at Gradio that create
interface
s for models. And from that I believe that some Parameters are missing from Param. Gradio takes the approach of annotating your model with input widgets. From the input widgets the parameter types are inferred. That is the opposite of what Param/ Panel does.Summary
If I take a look at the inputs of Gradio I believe the following could be missing from param
Analysis
Additional Context
Panel
In Panel we are then lacking the drag and drop inputs for
Image
,Video
,Audio
andFile
that displays the things that is dropped onto the input.Interface
I am considering how we can make it as easy and powerful to create model interfaces with Panel as it is with Gradio. One approach is to get very inspired by its interface api. Another approach would be to stick to a Param/ Panel approach but make it as easy to use as possible.