Spaces:
Running
Running
if not is_questions_answers_exists:
Browse files
app.py
CHANGED
@@ -1099,8 +1099,7 @@ def get_questions_answers(video_id, df_string, source="gcs"):
|
|
1099 |
blob_name = f"{video_id}/{file_name}"
|
1100 |
# 检查檔案是否存在
|
1101 |
is_questions_answers_exists = GCS_SERVICE.check_file_exists(bucket_name, blob_name)
|
1102 |
-
|
1103 |
-
if True:
|
1104 |
questions_answers = generate_questions_answers(df_string)
|
1105 |
questions_answers_text = json.dumps(questions_answers, ensure_ascii=False, indent=2)
|
1106 |
upload_file_to_gcs_with_json_string(gcs_client, bucket_name, blob_name, questions_answers_text)
|
|
|
1099 |
blob_name = f"{video_id}/{file_name}"
|
1100 |
# 检查檔案是否存在
|
1101 |
is_questions_answers_exists = GCS_SERVICE.check_file_exists(bucket_name, blob_name)
|
1102 |
+
if not is_questions_answers_exists:
|
|
|
1103 |
questions_answers = generate_questions_answers(df_string)
|
1104 |
questions_answers_text = json.dumps(questions_answers, ensure_ascii=False, indent=2)
|
1105 |
upload_file_to_gcs_with_json_string(gcs_client, bucket_name, blob_name, questions_answers_text)
|