File size: 741 Bytes
ac2109e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import gradio as gr
import os 

def gen(prompt):
    return f'WORK: {prompt}'
    

css = """
footer {visibility: hidden !important;}
"""

with gr.Blocks(css=css) as ui:
    with gr.Tab("Генерация", id='vkl1'):
        with gr.Row():
            prompt = gr.Textbox(label="Prompt", lines=3)
    with gr.Tab("Параметры", id='vkl2'):
        gr.Markdown("## Скоро...")
        
    text_button = gr.Button("Генерация", variant='primary', elem_id="generate")
   
    text_output = gr.Textbox(show_label=False, placeholder="Привет! Чем я могу вам помочь?")
    
    text_button.click(gen, inputs=[prompt], outputs=text_output)

                      

#end
ui.queue(api_open=False).launch()