mirror of
https://github.com/artegoser/image-pluser-webui.git
synced 2025-02-23 12:43:15 +03:00
feat: tabs system
This commit is contained in:
parent
5b33b2cd66
commit
ca3d0969bc
6 changed files with 92 additions and 47 deletions
13
tabs/Bulk processing/app.py
Normal file
13
tabs/Bulk processing/app.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
import gradio as gr
|
||||
from processing.bulk import images_to_video
|
||||
|
||||
with gr.Blocks() as app:
|
||||
gr.Markdown(
|
||||
"Mass processing of images one at a time and saving to video if needed. # **WIP, not working**")
|
||||
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")
|
||||
submit = gr.Button("Submit")
|
17
tabs/Images to video/app.py
Normal file
17
tabs/Images to video/app.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
import gradio as gr
|
||||
from processing.bulk import images_to_video
|
||||
|
||||
with gr.Blocks() as app:
|
||||
gr.Markdown("Convert images to video. # **WIP, not working**")
|
||||
with gr.Row():
|
||||
with gr.Column():
|
||||
directory = gr.Text(
|
||||
placeholder="A directory with many images of the same size", lines=1, label="Directory")
|
||||
|
||||
fps = gr.Number(label="FPS")
|
||||
submit = gr.Button("Submit")
|
||||
|
||||
submit.click(
|
||||
fn=images_to_video,
|
||||
inputs=[directory, fps],
|
||||
)
|
18
tabs/Stacking/app.py
Normal file
18
tabs/Stacking/app.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
import gradio as gr
|
||||
from processing.stacking import stacking
|
||||
|
||||
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")
|
||||
submit = gr.Button("Submit")
|
||||
|
||||
with gr.Column():
|
||||
output = gr.Gallery()
|
||||
|
||||
submit.click(stacking, inputs=[
|
||||
directory, methods], outputs=[output])
|
12
tabs/Video to images/app.py
Normal file
12
tabs/Video to images/app.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
import gradio as gr
|
||||
|
||||
with gr.Blocks() as app:
|
||||
gr.Markdown(
|
||||
"Convert video to images. # **WIP, not working**")
|
||||
with gr.Row():
|
||||
with gr.Column():
|
||||
video = gr.Video(label="Video")
|
||||
|
||||
format = gr.Radio(
|
||||
choices=["png", "jpg"], value="png", label="Format of image")
|
||||
submit = gr.Button("Submit")
|
6
tabs/__init__.py
Normal file
6
tabs/__init__.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
tabs = [
|
||||
"Stacking",
|
||||
"Bulk processing",
|
||||
"Images to video",
|
||||
"Video to images"
|
||||
]
|
Loading…
Add table
Reference in a new issue