Update app.py
Browse files
app.py
CHANGED
@@ -147,34 +147,37 @@ footer, svelte-17yhekk {visibility: hidden !important;}
|
|
147 |
"""
|
148 |
|
149 |
with gr.Blocks(css=css, theme="YTheme/KidsShool") as dalle:
|
150 |
-
with gr.
|
151 |
-
with gr.
|
152 |
-
with gr.
|
153 |
with gr.Row():
|
154 |
-
|
|
|
|
|
155 |
|
156 |
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
|
173 |
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
|
|
178 |
|
179 |
text_button.click(query, inputs=[text_prompt, negative_prompt, model], outputs=image_output, concurrency_limit=44)
|
180 |
dalle.launch(show_api=False, share=False)
|
|
|
147 |
"""
|
148 |
|
149 |
with gr.Blocks(css=css, theme="YTheme/KidsShool") as dalle:
|
150 |
+
with gr.Row():
|
151 |
+
with gr.Column():
|
152 |
+
with gr.Tab("🏠 Базовые настройки"):
|
153 |
with gr.Row():
|
154 |
+
with gr.Column(elem_id="prompt-container"):
|
155 |
+
with gr.Row():
|
156 |
+
text_prompt = gr.Textbox(label="🌅 Описание изображения", placeholder="Реалистичная кошка сидит на подоконнике...", lines=3, elem_id="prompt-text-input")
|
157 |
|
158 |
|
159 |
+
with gr.Tab("⚙️ Расширенные настройки"):
|
160 |
+
with gr.Row():
|
161 |
+
negative_prompt = gr.Textbox(label="🚫 Чего не должно быть на фото?", placeholder="Текст, кошка", value="Искажения, пиксельность, блюр, размыто, плохое качество, текст", lines=3, elem_id="negative-prompt-text-input")
|
162 |
+
with gr.Row():
|
163 |
+
model = gr.Radio(label="Версия нейросети", choices=["1", "2"], value="1")
|
164 |
+
with gr.Row():
|
165 |
+
gpt = gr.Checkbox(label="😊 Помогатор (Просить Помогатора улучшить описание?)", value=True)
|
166 |
|
167 |
+
with gr.Tab("ℹ️ Информация"):
|
168 |
+
with gr.Row():
|
169 |
+
gr.Textbox(label="📝 Шаблон prompt", value="{prompt} | ultra detail, ultra elaboration, ultra quality, perfect.")
|
170 |
+
with gr.Row():
|
171 |
+
with gr.Column():
|
172 |
+
gr.HTML("""<button class="lg secondary svelte-cmf5ev" onclick="window.open('http://ai-hub.rf.gd', '_blank');">AI-HUB</button>""")
|
173 |
+
gr.HTML("""<button class="lg secondary svelte-cmf5ev" onclick="window.open('http://yufi.rf.gd', '_blank');">YUFI</button>""")
|
174 |
|
175 |
|
176 |
+
with gr.Row():
|
177 |
+
text_button = gr.Button("🔁 Генерация", variant='primary', elem_id="gen-button")
|
178 |
+
with gr.Column():
|
179 |
+
with gr.Row():
|
180 |
+
image_output = gr.Image(type="pil", label="Изображение", elem_id="gallery")
|
181 |
|
182 |
text_button.click(query, inputs=[text_prompt, negative_prompt, model], outputs=image_output, concurrency_limit=44)
|
183 |
dalle.launch(show_api=False, share=False)
|