Webui / app.py
NeoPy's picture
Create app.py
84a6095 verified
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()