Download app.py from ctran/Y: direct link, hf CLI and curl.
- Browser
- Download file 940 Bytes
-
https://huggingface.co/spaces/ctran/Y/resolve/main/app.py
- Command line
-
hf download hf://spaces/ctran/Y/app.py
-
curl -L -o app.py https://huggingface.co/spaces/ctran/Y/resolve/main/app.py
940 Bytes
| import gradio as gr | |
| from gradio_buttontip import ButtonTip | |
| def button_click(): | |
| return "Button clicked!" | |
| with gr.Blocks() as demo: | |
| gr.Markdown("This interface showcases a button with a tooltip.") | |
| with gr.Row(): | |
| inp = [ | |
| ButtonTip( | |
| tooltip="Tooltip Text", | |
| tooltip_color="white", # Custom color | |
| tooltip_background_color="red", | |
| x=120, # No horizontal offset | |
| y=-20, # Above the button | |
| value="Left Button" | |
| ), | |
| ButtonTip( | |
| tooltip="Tooltip Text", | |
| tooltip_color="white", # Custom color | |
| tooltip_background_color="blue", | |
| x=-90, # No horizontal offset | |
| y=-20, # Above the button | |
| value="Right Button" | |
| ) | |
| ] | |
| out = "Hello World" | |
| if __name__ == "__main__": | |
| demo.launch() | |