feat: bulk processing

This commit is contained in:
Artemy 2023-04-16 10:36:29 +03:00
parent eb26452ad6
commit 45916cd320
4 changed files with 44 additions and 6 deletions

View file

@ -1,5 +1,5 @@
import gradio as gr
from processing.bulk import images_to_video
from processing.bulk import bulk_processing
with gr.Blocks() as app:
gr.Markdown(
@ -7,7 +7,15 @@ with gr.Blocks() as app:
with gr.Row():
with gr.Column():
directory = gr.Text(
placeholder="A directory with many images of the same size", lines=1, label="Directory")
methods = gr.Dropdown(
choices=["denoise", "startracks", "noise extractor", "untrack"], value="denoise", label="Method")
placeholder="A directory with many images.", lines=1, label="Directory")
method = gr.Dropdown(
choices=["canny edge"], value="canny edge", label="Method")
with gr.Accordion("Advanced settings", open=False) as acc:
out_dir = gr.Text(
label="Output directory", placeholder="The directory where the processed photos will be saved. If not specified `./output/images`")
submit = gr.Button("Submit")
submit.click(
fn=bulk_processing,
inputs=[directory, out_dir, method],
)