File size: 1,400 Bytes
bfd6cec
 
 
 
6e32e0c
bfd6cec
 
 
 
 
 
 
 
 
6e32e0c
bfd6cec
 
 
 
 
 
 
 
 
 
2eccc5d
 
 
bfd6cec
 
 
 
6e32e0c
 
bfd6cec
 
 
 
 
 
 
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
37
38
39
40
41
42
import os
import gradio as gr
from oss_utils import ossService, get_random_string

def refresh_video(uuid, request_id, task_id):
    if uuid is None or uuid == '':
        uuid = get_random_string()
        print(f'[refresh_video] generate a uuid {uuid}')

    print(f'[refresh_video] uuid: {uuid}')
    print(f'[refresh_video] request_id: {request_id}')

    notes = 'ζ­£εœ¨ε€„η†ζ‚¨ηš„θ§†ι’‘η”Ÿζˆδ»»εŠ‘,ιœ€η­‰εΎ…4.8εˆ†ι’Ÿε·¦ε³οΌŒη‚Ήε‡»εˆ·ζ–°θŽ·ε–ζœ€ζ–°η”ŸζˆθΏ›εΊ¦'
    output = 'output/20241025174546.mp4'
    return uuid, request_id, task_id


with gr.Blocks() as demo:
    with gr.Row():
        with gr.Column(scale=0.8, min_width=0.8):
            # user_notes = gr.Textbox(show_label=False, text_align='left', elem_id='text_style11')
            user_notes = gr.Textbox(show_label=False, text_align='left')
        with gr.Column(scale=0.2, min_width=0.2):
            refresh_button = gr.Button(value="εˆ·ζ–°", elem_id='button_param1')

    uuid = gr.Text(label="huggingface_uuid", visible=True)
    request_id = gr.Text(label="huggingface_request_id", visible=True)
    task_id = gr.Text(label="huggingface_task_id", visible=True)

    refresh_button.click(
        fn=refresh_video,
        queue=False,
        inputs=[uuid, request_id, task_id],
        outputs=[uuid, request_id, task_id]
    )



if __name__ == "__main__":
    demo.queue(max_size=100)
    demo.launch(share=False)