jiayong commited on
Commit
bdf83d7
·
1 Parent(s): 058dce7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -23
app.py CHANGED
@@ -431,30 +431,30 @@ with gr.Blocks(title = "追影",
431
  </div>
432
  """)
433
 
434
- if ENABLE_OSS_RESOURCES:
435
- snapshots = ""
436
- sample_video_list = get_dirnames(filePath="./data/sample_video", tail=".mp4")
437
- for i in range(12):
438
- if i < len(sample_video_list):
439
- file_name = os.path.basename(sample_video_list[i])
440
- oss_path = "oss://vigen-invi/video_generation/sample_video/" + file_name
441
- style = "video/snapshot,t_1000,f_jpg,w_560,h_800,m_fast"
442
- params = {'x-oss-process': style}
443
- _, url = oss_service.sign(oss_path, timeout=3600*100, params=params)
444
- snapshots = snapshots + url + ";"
445
 
446
- referenceVideoSnapshots = ""
447
- template_video_list = examples['template_video']
448
- for i in range(9):
449
- if i < len(template_video_list):
450
- file_name = template_video_list[i]
451
- oss_path = "oss://vigen-invi/video_generation/template_video1/" + file_name
452
- style = "video/snapshot,t_1000,f_jpg,w_56,h_80,m_fast" #112,160
453
- params = {'x-oss-process': style}
454
- _, url = oss_service.sign(oss_path, timeout=3600*100, params=params)
455
- referenceVideoSnapshots = referenceVideoSnapshots + url + ";"
456
- format_text = script_text_to_load_results.format(snapshots, referenceVideoSnapshots)
457
- demo.load(_js = format_text)
458
 
459
 
460
  demo.queue(api_open=False, concurrency_count=1000).launch(
 
431
  </div>
432
  """)
433
 
434
+ # if ENABLE_OSS_RESOURCES:
435
+ # snapshots = ""
436
+ # sample_video_list = get_dirnames(filePath="./data/sample_video", tail=".mp4")
437
+ # for i in range(12):
438
+ # if i < len(sample_video_list):
439
+ # file_name = os.path.basename(sample_video_list[i])
440
+ # oss_path = "oss://vigen-invi/video_generation/sample_video/" + file_name
441
+ # style = "video/snapshot,t_1000,f_jpg,w_560,h_800,m_fast"
442
+ # params = {'x-oss-process': style}
443
+ # _, url = oss_service.sign(oss_path, timeout=3600*100, params=params)
444
+ # snapshots = snapshots + url + ";"
445
 
446
+ # referenceVideoSnapshots = ""
447
+ # template_video_list = examples['template_video']
448
+ # for i in range(9):
449
+ # if i < len(template_video_list):
450
+ # file_name = template_video_list[i]
451
+ # oss_path = "oss://vigen-invi/video_generation/template_video1/" + file_name
452
+ # style = "video/snapshot,t_1000,f_jpg,w_56,h_80,m_fast" #112,160
453
+ # params = {'x-oss-process': style}
454
+ # _, url = oss_service.sign(oss_path, timeout=3600*100, params=params)
455
+ # referenceVideoSnapshots = referenceVideoSnapshots + url + ";"
456
+ # format_text = script_text_to_load_results.format(snapshots, referenceVideoSnapshots)
457
+ # demo.load(_js = format_text)
458
 
459
 
460
  demo.queue(api_open=False, concurrency_count=1000).launch(