File size: 1,706 Bytes
84a6095
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import gradio as gr

def demo_interface():
    with gr.Blocks() as demo:
        # Top label
        gr.Markdown(
            """
            <h1 style="text-align: center; margin-bottom: 1rem;">
                LABEL
            </h1>
            """,
            elem_id="top_label"
        )

        # Main Tabs label
        gr.Markdown(
            """
            <h2 style="text-align: center; margin-bottom: 1rem;">
                MAIN TABS
            </h2>
            """,
            elem_id="main_tabs_label"
        )

        # Actual tabs
        with gr.Tabs():
            with gr.Tab("Tabs 1"):
                # Replace with any components you want
                gr.Markdown(
                    """
                    <div style="text-align: center;">
                        <h3>All options 1</h3>
                        <!-- Put your controls, sliders, textboxes, etc. here -->
                    </div>
                    """
                )

            with gr.Tab("Tabs 2"):
                # Replace with any components you want
                gr.Markdown(
                    """
                    <div style="text-align: center;">
                        <h3>All options 2</h3>
                        <!-- Put your controls, sliders, textboxes, etc. here -->
                    </div>
                    """
                )

        # Credits label at the bottom
        gr.Markdown(
            """
            <p style="text-align: center; margin-top: 2rem;">
                CREDITS Label
            </p>
            """,
            elem_id="credits_label"
        )

    return demo

if __name__ == "__main__":
    ui = demo_interface()
    ui.launch()