text-generation-webui icon indicating copy to clipboard operation
text-generation-webui copied to clipboard

[Enhancement, Colab] Add another way to get Gradio's public URL

Open Xabab opened this issue 3 years ago • 0 comments

I often switch between my phone and PC when using chat and if "Character bias" is on (I have it on permanently) public URL is getting lost being truncated in the terminal because of amount of lines outputted. So far I need either send the link from one device to another or restart the cell to receive another link to Gradio

There is a way like so: https://www.reddit.com/r/GoogleColab/comments/n69c40/copy_text_to_clipboard/

from IPython.display import HTML
text = 'copy this text to clipboard'
HTML(f"<button onclick=navigator.clipboard.writeText('{text}')>Copy</button>")

But it is not persistent between devices or after page reload.

Xabab avatar Feb 27 '23 18:02 Xabab