Spaces:
Runtime error
Runtime error
Update app.py
Browse filesfix bug of gradio version 4.12
app.py
CHANGED
@@ -266,7 +266,7 @@ with gr.Blocks(title = "追影",
|
|
266 |
prompt_template = gr.Textbox(placeholder="输入提示词控制生成效果,如人物,人物的服饰、场景等,支持中/英文输入。",label="Prompt提示词", lines=2,interactive=True,show_label=False, text_align='left')
|
267 |
with gr.Row():
|
268 |
# FIXME: the width/height setting not work here, TODO: CSS 调整
|
269 |
-
ref_video = gr.Video(sources='upload',
|
270 |
# gr.Examples(examples['template_video'], examples_per_page=9,inputs=[ref_video], label='样例视频')
|
271 |
# dataset_select = gr.Dataset(
|
272 |
# label='样例视频',
|
@@ -307,14 +307,14 @@ with gr.Blocks(title = "追影",
|
|
307 |
refresh_button = gr.Button(value="刷新", elem_id='button_param1')
|
308 |
|
309 |
with gr.Row():
|
310 |
-
output_video0 = gr.Video(
|
311 |
output_snapshot_image0 = gr.Image(sources='upload', type='filepath', show_label=False, interactive=False, elem_id='output_snapshot_image1', width=200,height=1, visible=False)
|
312 |
-
output_video1 = gr.Video(
|
313 |
output_snapshot_image1 = gr.Image(sources='upload', type='filepath', show_label=False, interactive=False, elem_id='output_snapshot_image2', width=200,height=1, visible=False)
|
314 |
with gr.Row():
|
315 |
-
output_video2 = gr.Video(
|
316 |
output_snapshot_image2 = gr.Image(sources='upload', type='filepath', show_label=False, interactive=False, elem_id='output_snapshot_image3', width=200,height=1, visible=False)
|
317 |
-
output_video3 = gr.Video(
|
318 |
output_snapshot_image3 = gr.Image(sources='upload', type='filepath', show_label=False, interactive=False, elem_id='output_snapshot_image4', width=200,height=1, visible=False)
|
319 |
|
320 |
uuid = gr.Text(label="modelscope_uuid", visible=False)
|
@@ -325,7 +325,7 @@ with gr.Blocks(title = "追影",
|
|
325 |
mp4_lists = get_dirnames(filePath="./data/sample_video", tail=".mp4")
|
326 |
# mp4_listss = [[i] for i in mp4_lists]
|
327 |
# gr.Markdown("样例视频",elem_id='font_style')
|
328 |
-
# ref_video1 = gr.Video(sources='upload', height=400,
|
329 |
# with gr.Group():
|
330 |
# gr.Examples(mp4_listss, examples_per_page=12, inputs=[ref_video1], label='')
|
331 |
|
|
|
266 |
prompt_template = gr.Textbox(placeholder="输入提示词控制生成效果,如人物,人物的服饰、场景等,支持中/英文输入。",label="Prompt提示词", lines=2,interactive=True,show_label=False, text_align='left')
|
267 |
with gr.Row():
|
268 |
# FIXME: the width/height setting not work here, TODO: CSS 调整
|
269 |
+
ref_video = gr.Video(sources='upload', show_label=False, label='输入视频', autoplay=True, elem_id='show_window_video', width=224, height=360)
|
270 |
# gr.Examples(examples['template_video'], examples_per_page=9,inputs=[ref_video], label='样例视频')
|
271 |
# dataset_select = gr.Dataset(
|
272 |
# label='样例视频',
|
|
|
307 |
refresh_button = gr.Button(value="刷新", elem_id='button_param1')
|
308 |
|
309 |
with gr.Row():
|
310 |
+
output_video0 = gr.Video(format="mp4", show_label=False, label="Result Video", autoplay=True, elem_id='show_window_result1', elem_classes="show_window_result")
|
311 |
output_snapshot_image0 = gr.Image(sources='upload', type='filepath', show_label=False, interactive=False, elem_id='output_snapshot_image1', width=200,height=1, visible=False)
|
312 |
+
output_video1 = gr.Video(format="mp4", show_label=False, label="Result Video", autoplay=True,elem_id='show_window_result2', elem_classes="show_window_result")
|
313 |
output_snapshot_image1 = gr.Image(sources='upload', type='filepath', show_label=False, interactive=False, elem_id='output_snapshot_image2', width=200,height=1, visible=False)
|
314 |
with gr.Row():
|
315 |
+
output_video2 = gr.Video(format="mp4", show_label=False, label="Result Video", autoplay=True,elem_id='show_window_result3', elem_classes="show_window_result")
|
316 |
output_snapshot_image2 = gr.Image(sources='upload', type='filepath', show_label=False, interactive=False, elem_id='output_snapshot_image3', width=200,height=1, visible=False)
|
317 |
+
output_video3 = gr.Video(format="mp4", show_label=False, label="Result Video", autoplay=True,elem_id='show_window_result4', elem_classes="show_window_result")
|
318 |
output_snapshot_image3 = gr.Image(sources='upload', type='filepath', show_label=False, interactive=False, elem_id='output_snapshot_image4', width=200,height=1, visible=False)
|
319 |
|
320 |
uuid = gr.Text(label="modelscope_uuid", visible=False)
|
|
|
325 |
mp4_lists = get_dirnames(filePath="./data/sample_video", tail=".mp4")
|
326 |
# mp4_listss = [[i] for i in mp4_lists]
|
327 |
# gr.Markdown("样例视频",elem_id='font_style')
|
328 |
+
# ref_video1 = gr.Video(sources='upload', height=400, show_label=False, visible=False, label='输入视频',elem_id='show_window_video')
|
329 |
# with gr.Group():
|
330 |
# gr.Examples(mp4_listss, examples_per_page=12, inputs=[ref_video1], label='')
|
331 |
|