2023-04-16 08:51:33 +03:00
|
|
|
import gradio as gr
|
|
|
|
from processing.stacking import stacking
|
2023-04-18 13:16:16 +03:00
|
|
|
from methods.stack_methods import methods
|
2023-04-16 08:51:33 +03:00
|
|
|
|
|
|
|
with gr.Blocks() as app:
|
|
|
|
gr.Markdown("Stacking images.")
|
|
|
|
with gr.Row():
|
|
|
|
with gr.Column():
|
|
|
|
directory = gr.Text(
|
2023-04-18 13:16:16 +03:00
|
|
|
placeholder="A directory with many images of the same size",
|
|
|
|
lines=1,
|
|
|
|
label="Directory",
|
|
|
|
)
|
|
|
|
method = gr.Dropdown(choices=methods, value=methods[0], label="Method")
|
2023-04-16 08:51:33 +03:00
|
|
|
submit = gr.Button("Submit")
|
|
|
|
|
|
|
|
with gr.Column():
|
|
|
|
output = gr.Gallery()
|
|
|
|
|
2023-04-18 13:16:16 +03:00
|
|
|
submit.click(stacking, inputs=[directory, method], outputs=[output])
|