mirror of
https://github.com/artegoser/image-pluser-webui.git
synced 2025-02-23 12:43:15 +03:00
refactor: methods
This commit is contained in:
parent
3f1d13c1c0
commit
09346cb114
6 changed files with 35 additions and 24 deletions
|
@ -1,5 +1,6 @@
|
|||
import gradio as gr
|
||||
from processing.bulk import bulk_processing
|
||||
from methods.bulk_methods import methods
|
||||
|
||||
with gr.Blocks() as app:
|
||||
gr.Markdown(
|
||||
|
@ -11,8 +12,8 @@ with gr.Blocks() as app:
|
|||
placeholder="A directory with many images.", lines=1, label="Directory"
|
||||
)
|
||||
method = gr.Dropdown(
|
||||
choices=["Edge detection", "Canny edge detection", "sharpen"],
|
||||
value="Sharpen",
|
||||
choices=methods,
|
||||
value=methods[0],
|
||||
label="Method",
|
||||
)
|
||||
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
import gradio as gr
|
||||
from processing.stacking import stacking
|
||||
from methods.stack_methods import methods
|
||||
|
||||
with gr.Blocks() as app:
|
||||
gr.Markdown("Stacking images.")
|
||||
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 of the same size",
|
||||
lines=1,
|
||||
label="Directory",
|
||||
)
|
||||
method = gr.Dropdown(choices=methods, value=methods[0], label="Method")
|
||||
submit = gr.Button("Submit")
|
||||
|
||||
with gr.Column():
|
||||
output = gr.Gallery()
|
||||
|
||||
submit.click(stacking, inputs=[
|
||||
directory, methods], outputs=[output])
|
||||
submit.click(stacking, inputs=[directory, method], outputs=[output])
|
||||
|
|
Loading…
Add table
Reference in a new issue