File size: 3,030 Bytes
c3392d4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
import gradio as gr

with gr.Blocks(title="Styling Examples") as demo:
    with gr.Column():
        txt = gr.Textbox(label="Small Textbox", lines=1).style(
            rounded=False,
            border=False,
            container=False,
        )

        num = gr.Number(label="Number", show_label=False).style(
            rounded=False,
            border=False,
            container=False,
        )
        slider = gr.Slider(label="Slider", show_label=False).style(
            container=False,
        )
        check = gr.Checkbox(label="Checkbox", show_label=False).style(
            rounded=False,
            border=False,
            container=False,
        )
        check_g = gr.CheckboxGroup(
            label="Checkbox Group", choices=["One", "Two", "Three"], show_label=False
        ).style(rounded=False, container=False, item_container=False)
        radio = gr.Radio(
            label="Radio", choices=["One", "Two", "Three"], show_label=False
        ).style(
            item_container=False,
            container=False,
        )
        drop = gr.Dropdown(
            label="Dropdown", choices=["One", "Two", "Three"], show_label=False
        ).style(
            rounded=False,
            border=False,
            container=False,
        )
        image = gr.Image(show_label=False).style(
            rounded=False,
        )
        video = gr.Video(show_label=False).style(
            rounded=False,
        )
        audio = gr.Audio(show_label=False).style(
            rounded=False,
        )
        file = gr.File(show_label=False).style(
            rounded=False,
        )
        df = gr.Dataframe(show_label=False).style(
            rounded=False,
        )

        ts = gr.Timeseries(show_label=False).style(
            rounded=False,
        )
        label = gr.Label().style(
            container=False,
        )
        highlight = gr.HighlightedText(
            "+ hello. - goodbye", show_label=False, color_map={"+": "green", "-": "red"}
        ).style(rounded=False, container=False)
        json = gr.JSON().style(container=False)
        html = gr.HTML(show_label=False).style()
        gallery = gr.Gallery().style(
            rounded=False,
            grid=(3, 3, 1),
            height="auto",
            container=False,
        )
        chat = gr.Chatbot("hi", color_map=("pink", "blue")).style(
            rounded=False,
        )

        model = gr.Model3D().style(
            rounded=False,
        )

        gr.Plot().style()
        md = gr.Markdown(show_label=False).style()

        highlight = gr.HighlightedText().style(
            rounded=False,
        )

        btn = gr.Button("Run").style(
            rounded=False,
            full_width=True,
            border=False,
        )

        # Not currently public
        # TODO: Uncomment at next release
        # gr.Dataset().style(
        #     rounded=False,
        #     margin=False,
        #     border=False,
        # )


if __name__ == "__main__":
    demo.launch()