youngtsai commited on
Commit
2814ef1
1 Parent(s): 617b2b5

is_transcript_exists

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -434,8 +434,8 @@ def process_transcript_and_screenshots_on_gcs(video_id):
434
  transcript_file_name = f'{video_id}_transcript.json'
435
  transcript_blob_name = f"{video_id}/{transcript_file_name}"
436
  # 检查逐字稿是否存在
437
- exists = gcs_check_file_exists(gcs_client, bucket_name, transcript_blob_name)
438
- if not exists:
439
  # 从YouTube获取逐字稿并上传
440
  transcript = get_transcript(video_id)
441
  transcript_text = json.dumps(transcript, ensure_ascii=False, indent=2)
 
434
  transcript_file_name = f'{video_id}_transcript.json'
435
  transcript_blob_name = f"{video_id}/{transcript_file_name}"
436
  # 检查逐字稿是否存在
437
+ is_transcript_exists = gcs_check_file_exists(gcs_client, bucket_name, transcript_blob_name)
438
+ if not is_transcript_exists:
439
  # 从YouTube获取逐字稿并上传
440
  transcript = get_transcript(video_id)
441
  transcript_text = json.dumps(transcript, ensure_ascii=False, indent=2)