Update app.py
Browse files
app.py
CHANGED
|
@@ -18,18 +18,18 @@ def images(text, input_image, pictures):
|
|
| 18 |
return [input_image] * pictures
|
| 19 |
|
| 20 |
# Gradio
|
| 21 |
-
with gr.Blocks(theme=gr.themes.Default(primary_hue=gr.themes.colors.
|
| 22 |
gr.Markdown("# DoomAI")
|
| 23 |
gr.Markdown(description)
|
| 24 |
with gr.Row():
|
| 25 |
with gr.Column():
|
| 26 |
with gr.Row(equal_height=True):
|
| 27 |
# input images
|
| 28 |
-
image_input_1 = gr.Image(label="Картинка", type="filepath")
|
| 29 |
|
| 30 |
# text prompt
|
| 31 |
pictures_slider = gr.Slider(
|
| 32 |
-
label="Количество картинок", minimum=1.0, maximum=20.0, value=10, step=1
|
| 33 |
)
|
| 34 |
|
| 35 |
prompt_input = gr.Textbox(
|
|
@@ -39,12 +39,15 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue=gr.themes.colors.orange, seco
|
|
| 39 |
|
| 40 |
# generate
|
| 41 |
generate_button = gr.Button("Найти", variant='primary')
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
with gr.Column():
|
| 44 |
# output image
|
| 45 |
# add gallery of 20 pictures here
|
| 46 |
#output_image = gr.Image(label="Output Image", sources='upload')
|
| 47 |
-
gallery = gr.Gallery(label='
|
| 48 |
|
| 49 |
# click
|
| 50 |
generate_button.click(
|
|
|
|
| 18 |
return [input_image] * pictures
|
| 19 |
|
| 20 |
# Gradio
|
| 21 |
+
with gr.Blocks(theme=gr.themes.Default(primary_hue=gr.themes.colors.blue, secondary_hue=gr.themes.colors.orange)) as demo:
|
| 22 |
gr.Markdown("# DoomAI")
|
| 23 |
gr.Markdown(description)
|
| 24 |
with gr.Row():
|
| 25 |
with gr.Column():
|
| 26 |
with gr.Row(equal_height=True):
|
| 27 |
# input images
|
| 28 |
+
image_input_1 = gr.Image(label="Картинка", type="filepath", sources=['upload', 'clipboard'])
|
| 29 |
|
| 30 |
# text prompt
|
| 31 |
pictures_slider = gr.Slider(
|
| 32 |
+
label="Количество картинок", minimum=1.0, maximum=20.0, value=10, step=1,
|
| 33 |
)
|
| 34 |
|
| 35 |
prompt_input = gr.Textbox(
|
|
|
|
| 39 |
|
| 40 |
# generate
|
| 41 |
generate_button = gr.Button("Найти", variant='primary')
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
|
| 45 |
|
| 46 |
with gr.Column():
|
| 47 |
# output image
|
| 48 |
# add gallery of 20 pictures here
|
| 49 |
#output_image = gr.Image(label="Output Image", sources='upload')
|
| 50 |
+
gallery = gr.Gallery(label='Галерея', columns=4, rows=5, scale=2)
|
| 51 |
|
| 52 |
# click
|
| 53 |
generate_button.click(
|