Spaces:
Paused
Paused
File size: 1,134 Bytes
eeaf31b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import gradio as gr
from project_settings import project_path
def get_video_upload_tasks_tab():
with gr.TabItem("video_upload_tasks"):
with gr.Row():
tasks_src = gr.Textbox(label="tasks_src", max_lines=10)
tasks_platform = gr.Dropdown(choices=["douyin"], value="douyin", label="platform")
tasks_target_dir = gr.Dropdown(choices=["douyin"], value="douyin", label="target_dir")
tasks_delay = gr.DateTime(value="delay")
tasks_add_button = gr.Button("add_task", variant="primary")
def when_click_tasks_add_button(src: str, platform: str, target_dir: str, delay: str):
print(src)
return None
tasks_add_button.click(
fn=when_click_tasks_add_button,
inputs=[
tasks_src, tasks_platform, tasks_target_dir, tasks_delay,
],
outputs=None,
)
return locals()
if __name__ == "__main__":
with gr.Blocks() as block:
video_upload_tasks_components = get_video_upload_tasks_tab()
block.launch()
|