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)
|