whitecat29 commited on
Commit
0d0fdc8
1 Parent(s): 5d0d0d3

Add application file

Browse files
Files changed (3) hide show
  1. README.md +2 -2
  2. app.py +23 -0
  3. requirements.txt +1 -0
README.md CHANGED
@@ -1,6 +1,6 @@
1
  ---
2
- title: 'Y'
3
- emoji: 🌖
4
  colorFrom: yellow
5
  colorTo: pink
6
  sdk: gradio
 
1
  ---
2
+ title: X
3
+ emoji: 🦀
4
  colorFrom: yellow
5
  colorTo: pink
6
  sdk: gradio
app.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import gradio as gr
3
+ from gradio_buttontip import ButtonTip
4
+
5
+ def button_click():
6
+ return "Button clicked!"
7
+
8
+ with gr.Blocks() as demo:
9
+ gr.Markdown("This interface showcases a button with a tooltip.")
10
+ with gr.Row():
11
+ inp = ButtonTip(
12
+ tooltip="Tooltip Text",
13
+ tooltip_color="white", # Custom color
14
+ tooltip_background_color="red",
15
+ x=120, # No horizontal offset
16
+ y=-20, # Above the button
17
+ value="Top Button"
18
+ )
19
+ out = gr.Textbox()
20
+ inp.click(button_click, inp, out)
21
+
22
+ if __name__ == "__main__":
23
+ demo.launch()
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ gradio_buttontip