File size: 983 Bytes
4f9ea74
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0f9319e
cda6782
4f9ea74
 
cda6782
 
4f9ea74
 
 
cda6782
4f9ea74
 
cda6782
4f9ea74
 
 
 
 
 
 
 
 
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
# 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()