Gradio-Snippets / app.py
Nymbo's picture
Update app.py
cda6782 verified
raw
history blame contribute delete
983 Bytes
# imports
import gradio as gr
# functions
def test(number, text):
return f'{number} - {text}'
# css
css = """
footer {visibility: hidden !important;}
"""
# ui
with gr.Blocks(css=css) as vui:
with gr.Tab("Tab 1", id='vkl1'):
with gr.Row():
with gr.Column(scale=3):
enter_one = gr.Textbox(placeholder="Text Input 1", show_label=False, lines=3)
with gr.Tab("Tab 2", id='vkl2'):
with gr.Row():
with gr.Column(scale=3):
with gr.Row():
with gr.Accordion(label="Dropdown List", open=False):
num = gr.Radio(interactive=True, value="1", show_label=False, choices=["1", "2"])
vkl2_text_button = gr.Button("Generation", variant='primary', elem_id="generate")
vkl2_text_output = gr.Textbox()
vkl2_text_button.click(test, inputs=[num, enter_one], outputs=vkl2_text_output)
#end
vui.queue(api_open=False).launch()