Spaces:
Sleeping
Sleeping
Lazarus
commited on
Commit
·
4414da3
1
Parent(s):
67151b6
theme update
Browse files- app.py +8 -5
- functions.py +1 -3
app.py
CHANGED
|
@@ -65,9 +65,12 @@ def convert(file: _TemporaryFileWrapper, container_format: str, new_state: str):
|
|
| 65 |
return [output_file, output_file, output_file, output, new_state]
|
| 66 |
|
| 67 |
|
| 68 |
-
with gr.Blocks(
|
|
|
|
|
|
|
|
|
|
| 69 |
# with gr.Tabs():
|
| 70 |
-
with gr.Tab("Format"):
|
| 71 |
# Input Buttons
|
| 72 |
with gr.Row():
|
| 73 |
with gr.Column() as inputs:
|
|
@@ -128,7 +131,7 @@ with gr.Blocks(css="./styles.css") as demo:
|
|
| 128 |
],
|
| 129 |
)
|
| 130 |
|
| 131 |
-
with gr.Tab("Video"):
|
| 132 |
with gr.Row() as video_inputs:
|
| 133 |
video_options = gr.Dropdown(
|
| 134 |
label="video", choices=video_codecs, value=video_codecs[-1]
|
|
@@ -143,7 +146,7 @@ with gr.Blocks(css="./styles.css") as demo:
|
|
| 143 |
videoReset = Clear(video_inputs)
|
| 144 |
clearBtn.click(videoReset.clear, videoReset(), videoReset())
|
| 145 |
|
| 146 |
-
with gr.Tab("Audio"):
|
| 147 |
with gr.Row() as audio_inputs:
|
| 148 |
# print(names[0])
|
| 149 |
audio_options = gr.Dropdown(
|
|
@@ -171,7 +174,7 @@ with gr.Blocks(css="./styles.css") as demo:
|
|
| 171 |
audioReset = Clear(audio_inputs)
|
| 172 |
clearBtn.click(audioReset.clear, audioReset(), audioReset())
|
| 173 |
|
| 174 |
-
with gr.Tab("Filters") as filter_inputs:
|
| 175 |
gr.Markdown("## Video")
|
| 176 |
# equal_height=True
|
| 177 |
with gr.Row(equal_height=True) as filter_inputs:
|
|
|
|
| 65 |
return [output_file, output_file, output_file, output, new_state]
|
| 66 |
|
| 67 |
|
| 68 |
+
with gr.Blocks(
|
| 69 |
+
css="./styles.css",
|
| 70 |
+
theme=gr.themes.Default(primary_hue=gr.themes.colors.amber),
|
| 71 |
+
) as demo:
|
| 72 |
# with gr.Tabs():
|
| 73 |
+
with gr.Tab("Format", id="format"):
|
| 74 |
# Input Buttons
|
| 75 |
with gr.Row():
|
| 76 |
with gr.Column() as inputs:
|
|
|
|
| 131 |
],
|
| 132 |
)
|
| 133 |
|
| 134 |
+
with gr.Tab("Video", id="video"):
|
| 135 |
with gr.Row() as video_inputs:
|
| 136 |
video_options = gr.Dropdown(
|
| 137 |
label="video", choices=video_codecs, value=video_codecs[-1]
|
|
|
|
| 146 |
videoReset = Clear(video_inputs)
|
| 147 |
clearBtn.click(videoReset.clear, videoReset(), videoReset())
|
| 148 |
|
| 149 |
+
with gr.Tab("Audio", id="audio"):
|
| 150 |
with gr.Row() as audio_inputs:
|
| 151 |
# print(names[0])
|
| 152 |
audio_options = gr.Dropdown(
|
|
|
|
| 174 |
audioReset = Clear(audio_inputs)
|
| 175 |
clearBtn.click(audioReset.clear, audioReset(), audioReset())
|
| 176 |
|
| 177 |
+
with gr.Tab("Filters", id="filters") as filter_inputs:
|
| 178 |
gr.Markdown("## Video")
|
| 179 |
# equal_height=True
|
| 180 |
with gr.Row(equal_height=True) as filter_inputs:
|
functions.py
CHANGED
|
@@ -107,7 +107,6 @@ class CommandBuilder:
|
|
| 107 |
# comp.change(fn=self.changefunc, inputs=[state, comp], outputs=[])
|
| 108 |
|
| 109 |
def changefunc(self, component_label: str | None, new_value=""):
|
| 110 |
-
print(component_label, "typaaaaaaaa", new_value)
|
| 111 |
label, *_ = (
|
| 112 |
component_label.strip(": \n").lower().split()
|
| 113 |
if component_label
|
|
@@ -141,8 +140,7 @@ class CommandBuilder:
|
|
| 141 |
self.extra = " ".join(lst_extra)
|
| 142 |
self.commands = f"{self.vf} {self.af} {self.extra}"
|
| 143 |
|
| 144 |
-
print(
|
| 145 |
-
print(self.output_dict, "out")
|
| 146 |
|
| 147 |
def set_vf(self, label: str, new_value: "str| int"):
|
| 148 |
"""Sets Video filters
|
|
|
|
| 107 |
# comp.change(fn=self.changefunc, inputs=[state, comp], outputs=[])
|
| 108 |
|
| 109 |
def changefunc(self, component_label: str | None, new_value=""):
|
|
|
|
| 110 |
label, *_ = (
|
| 111 |
component_label.strip(": \n").lower().split()
|
| 112 |
if component_label
|
|
|
|
| 140 |
self.extra = " ".join(lst_extra)
|
| 141 |
self.commands = f"{self.vf} {self.af} {self.extra}"
|
| 142 |
|
| 143 |
+
print(self.vf, self.af, self.extra)
|
|
|
|
| 144 |
|
| 145 |
def set_vf(self, label: str, new_value: "str| int"):
|
| 146 |
"""Sets Video filters
|