|
@@ -13,6 +13,7 @@ from whisper_asr import get_whisper_asr
|
|
|
from gpt_tag import request_gpt
|
|
|
from config import set_config
|
|
|
from log import Log
|
|
|
+from ReadXlsxFile import getVideoInfoInXlxs
|
|
|
|
|
|
from result_save import insert_content
|
|
|
from result_save import insert_content
|
|
@@ -277,4 +278,24 @@ def timer_check():
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
- timer_check()
|
|
|
+ # timer_check()
|
|
|
+ feature_df = getVideoInfoInXlxs('past_videos.xlsx')
|
|
|
+ video_id_list = feature_df['videoid'].to_list()
|
|
|
+ video_info = {}
|
|
|
+ for video_id in video_id_list:
|
|
|
+ title = feature_df[feature_df['videoid']
|
|
|
+ == video_id]['title'].values[0]
|
|
|
+ video_path = feature_df[feature_df['videoid']
|
|
|
+ == video_id]['video_path'].values[0]
|
|
|
+ if title is None:
|
|
|
+ continue
|
|
|
+ title = title.strip()
|
|
|
+ if len(title) < 1:
|
|
|
+ continue
|
|
|
+ # 获取asr结果
|
|
|
+ asr_res = get_asr_res(video_id)
|
|
|
+
|
|
|
+ video_info[video_id] = {'title': title,
|
|
|
+ 'video_path': video_path, 'asr_res': asr_res}
|
|
|
+ get_video_ai_tags(video_id=video_id,
|
|
|
+ video_info=video_info.get(video_id))
|