gradio
gradio copied to clipboard
Password text mode and calendar component enhancement requirements
I don't understand why these component functions haven't been available until now? such as side navigation components,calendar component,download button and etc. why gr.Textbox no password text mode?
These are great suggestions @tt0203! The reason is that for the most part, Gradio has been used to build machine learning demos, where these components are less common.
But these are great suggestions, especially as Gradio expands to more use cases. cc @freddyaboulton I think some of these are very relevant for the data science / dashboard use cases.
I would like to give implementing the Calendar component a shot, I personally found a use for it in filling information for my predictive model where I could use a single more robust component for the task instead of multiple.
Sounds good to me! I think a component that allows easy selection of dates would be quite helpful for data science applications. You'll find this Guide helpful in putting the new component: https://gradio.app/creating_a_new_component/
@pngwn @freddyaboulton @aliabid94 any additional thoughts?
Hi @mustafalhamadsa! We discussed as a team and we'd to see a DatePicker
component added to the library, if you are interested in contributing it! Some suggestions from the team:
- Use a lightweight 3rd party javascript library that works reliably (datepickers are notorious for edge cases so it should be something that is lightweight but well-tested)
- Support dates in different formats: MM/YY or MM/DD or MM/DD/YY
- Support both input (interactive mode for date selection) and output (non-interactive mode for date display)
- Potentially support date ranges as well if this doesn't complicate the user API too much
cc @pngwn
Hi @mustafalhamadsa would you still be interested in implementing a DatePicker
component?
Sorry I meant to follow up on this and forgot. Will add some notes soon.
Hi @mustafalhamadsa would you still be interested in implementing a
DatePicker
component?
Hello, I am sorry I just got back. Heavy heartedly here to tell you that it seems like it would be better to assign this mission to another team.
Thank you very much for your patience, and once again I am sorry.
As of #2653, we now support email and password textbox types, so renaming this issue
Hi! We've now made it possible for Gradio users to create their own custom components -- meaning that you can write some Python and JavaScript (Svelte), and publish it as a Gradio component. You can use it in your own Gradio apps, or share it so that anyone can use it in their Gradio apps. Here are some examples of custom Gradio components:
- A "Rich Textbox" that allows you to write bold/italics/colored text
- A "Folium Map Viewer" component that allows you to use interactive maps
You can see the source code for those components by clicking the "Files" icon and then clicking "src". The complete source code for the backend and frontend is visible. In particular, its very fast if you want to build off an existing component. We've put together a Guide: https://www.gradio.app/guides/five-minute-guide, and we're happy to help if you'd like to put together a custom component for this issue
We now have a custom Gradio component that does exactly this. You can install it here: https://pypi.org/project/gradio-grcalendar/
Awesome!
I get infinite loading when using gradio-grcalendar
Ah I believe @freddyaboulton is fixing that custom component -- stay tuned
me too. I get infinite loading. And How about gradio-datepicker by same auther? https://github.com/freddyaboulton/gradio-datepicker https://pypi.org/project/gradio-datepicker/ I try this v0.0.2 via pip, It works. I want to omit time value but I could not see the v0.0.2 code(0.0.1). I try gradio cc build, but It cannot use it.
Hello! Sorry for the delay. I have updated the calendar component. Here is the Pypi page and you can see an interactive demo here: https://huggingface.co/spaces/freddyaboulton/gradio_calendar
It uses the native html date picker component so the display of the calendar will vary a bit between browsers. Feel free to submit PRs to the space for improvements!
🔥