gradio icon indicating copy to clipboard operation
gradio copied to clipboard

Password text mode and calendar component enhancement requirements

Open tt0203 opened this issue 2 years ago • 3 comments

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?

tt0203 avatar Aug 17 '22 02:08 tt0203

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.

abidlabs avatar Aug 17 '22 04:08 abidlabs

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. image

mustafalhamadsa avatar Sep 16 '22 18:09 mustafalhamadsa

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?

abidlabs avatar Sep 16 '22 21:09 abidlabs

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

abidlabs avatar Sep 23 '22 21:09 abidlabs

Hi @mustafalhamadsa would you still be interested in implementing a DatePicker component?

abidlabs avatar Oct 14 '22 05:10 abidlabs

Sorry I meant to follow up on this and forgot. Will add some notes soon.

pngwn avatar Oct 14 '22 10:10 pngwn

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.

mustafalhamadsa avatar Oct 31 '22 16:10 mustafalhamadsa

As of #2653, we now support email and password textbox types, so renaming this issue

abidlabs avatar Nov 15 '22 22:11 abidlabs

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:

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

abidlabs avatar Nov 07 '23 00:11 abidlabs

We now have a custom Gradio component that does exactly this. You can install it here: https://pypi.org/project/gradio-grcalendar/

abidlabs avatar Dec 05 '23 16:12 abidlabs

Awesome!

albertvillanova avatar Dec 06 '23 06:12 albertvillanova

I get infinite loading when using gradio-grcalendar

ArmykOliva avatar Dec 08 '23 11:12 ArmykOliva

Ah I believe @freddyaboulton is fixing that custom component -- stay tuned

abidlabs avatar Dec 08 '23 16:12 abidlabs

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.

futurestandard avatar Dec 09 '23 05:12 futurestandard

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!

freddyaboulton avatar Dec 12 '23 03:12 freddyaboulton

🔥

abidlabs avatar Dec 12 '23 17:12 abidlabs