Spaces:
Sleeping
Sleeping
target_kvs = {
Browse files
app.py
CHANGED
@@ -1027,8 +1027,7 @@ def get_ai_content(password, video_id, df_string, topic, grade, level, specific_
|
|
1027 |
ai_content_list = json.loads(ai_content_list_string)
|
1028 |
# by key 找到 ai_content (topic, grade, level, specific_feature, content_type)
|
1029 |
target_kvs = {
|
1030 |
-
"
|
1031 |
-
"grade": grade,
|
1032 |
"level": level,
|
1033 |
"specific_feature": specific_feature,
|
1034 |
"content_type": content_type
|
@@ -1041,10 +1040,9 @@ def get_ai_content(password, video_id, df_string, topic, grade, level, specific_
|
|
1041 |
if len(ai_content_json) == 0:
|
1042 |
ai_content, prompt = generate_ai_content(password, df_string, topic, grade, level, specific_feature, content_type)
|
1043 |
ai_content_json = {
|
|
|
1044 |
"content": str(ai_content),
|
1045 |
"prompt": prompt,
|
1046 |
-
"topic": topic,
|
1047 |
-
"grade": grade,
|
1048 |
"level": level,
|
1049 |
"specific_feature": specific_feature,
|
1050 |
"content_type": content_type
|
|
|
1027 |
ai_content_list = json.loads(ai_content_list_string)
|
1028 |
# by key 找到 ai_content (topic, grade, level, specific_feature, content_type)
|
1029 |
target_kvs = {
|
1030 |
+
"video_id": video_id,
|
|
|
1031 |
"level": level,
|
1032 |
"specific_feature": specific_feature,
|
1033 |
"content_type": content_type
|
|
|
1040 |
if len(ai_content_json) == 0:
|
1041 |
ai_content, prompt = generate_ai_content(password, df_string, topic, grade, level, specific_feature, content_type)
|
1042 |
ai_content_json = {
|
1043 |
+
"video_id": video_id,
|
1044 |
"content": str(ai_content),
|
1045 |
"prompt": prompt,
|
|
|
|
|
1046 |
"level": level,
|
1047 |
"specific_feature": specific_feature,
|
1048 |
"content_type": content_type
|