gradio-app / gradio

Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!
http://www.gradio.app
Apache License 2.0
33.43k stars 2.53k forks source link

Add label to show_copy_button #7521

Closed FurkanGozukara closed 8 months ago

FurkanGozukara commented 8 months ago

Can we add copy to clipboard label to this icon?

image

Gradio latest version

single_output = gr.Textbox(label="Single Image Captioning Results", interactive=True, show_copy_button=True )

abidlabs commented 8 months ago

Hi @FurkanGozukara, do you mean adding the text "Copy to Clipboard" next to the copy icon? This change would by stylistically inconsistent with the other Gradio components and would be too crowded if the gr.Textbox() was taking up less horizontal space. For these reasons, we wouldn't provide an official gradio api for this.

But if you'd like, you could make this tweak or any other tweaks if you create a custom component based off of the core Gradio Textbox component!

As you may know, we've 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's an example of a Gradio custom component: https://github.com/PhyscalX/gradio-image-prompter -- it lets you upload images and process points or draw boxes on top of the image.

If you'd like to create your own, we've put together a Guide: https://www.gradio.app/guides/five-minute-guide, and we're happy to help.

FurkanGozukara commented 8 months ago

@abidlabs thank you so much. then i will pass :) i think perhaps you could add some styles like make it bigger more noticeable etc.

and here my latest gradio app. i love gradio

image