NeoPy commited on
Commit
84a6095
·
verified ·
1 Parent(s): 9c375be

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +63 -0
app.py ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def demo_interface():
4
+ with gr.Blocks() as demo:
5
+ # Top label
6
+ gr.Markdown(
7
+ """
8
+ <h1 style="text-align: center; margin-bottom: 1rem;">
9
+ LABEL
10
+ </h1>
11
+ """,
12
+ elem_id="top_label"
13
+ )
14
+
15
+ # Main Tabs label
16
+ gr.Markdown(
17
+ """
18
+ <h2 style="text-align: center; margin-bottom: 1rem;">
19
+ MAIN TABS
20
+ </h2>
21
+ """,
22
+ elem_id="main_tabs_label"
23
+ )
24
+
25
+ # Actual tabs
26
+ with gr.Tabs():
27
+ with gr.Tab("Tabs 1"):
28
+ # Replace with any components you want
29
+ gr.Markdown(
30
+ """
31
+ <div style="text-align: center;">
32
+ <h3>All options 1</h3>
33
+ <!-- Put your controls, sliders, textboxes, etc. here -->
34
+ </div>
35
+ """
36
+ )
37
+
38
+ with gr.Tab("Tabs 2"):
39
+ # Replace with any components you want
40
+ gr.Markdown(
41
+ """
42
+ <div style="text-align: center;">
43
+ <h3>All options 2</h3>
44
+ <!-- Put your controls, sliders, textboxes, etc. here -->
45
+ </div>
46
+ """
47
+ )
48
+
49
+ # Credits label at the bottom
50
+ gr.Markdown(
51
+ """
52
+ <p style="text-align: center; margin-top: 2rem;">
53
+ CREDITS Label
54
+ </p>
55
+ """,
56
+ elem_id="credits_label"
57
+ )
58
+
59
+ return demo
60
+
61
+ if __name__ == "__main__":
62
+ ui = demo_interface()
63
+ ui.launch()