Rooni commited on
Commit
ac2109e
·
1 Parent(s): 564b41b

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +28 -0
app.py ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import os
3
+
4
+ def gen(prompt):
5
+ return f'WORK: {prompt}'
6
+
7
+
8
+ css = """
9
+ footer {visibility: hidden !important;}
10
+ """
11
+
12
+ with gr.Blocks(css=css) as ui:
13
+ with gr.Tab("Генерация", id='vkl1'):
14
+ with gr.Row():
15
+ prompt = gr.Textbox(label="Prompt", lines=3)
16
+ with gr.Tab("Параметры", id='vkl2'):
17
+ gr.Markdown("## Скоро...")
18
+
19
+ text_button = gr.Button("Генерация", variant='primary', elem_id="generate")
20
+
21
+ text_output = gr.Textbox(show_label=False, placeholder="Привет! Чем я могу вам помочь?")
22
+
23
+ text_button.click(gen, inputs=[prompt], outputs=text_output)
24
+
25
+
26
+
27
+ #end
28
+ ui.queue(api_open=False).launch()