Spaces:
Sleeping
Sleeping
{prompt_add}
Browse files目前提交字數在100-200字之間,主題與內容的評等最高只能是B+。
app.py
CHANGED
@@ -1233,12 +1233,20 @@ def get_chinese_paragraph_1st_evaluate_content(thread_id, model, sys_content, pa
|
|
1233 |
verify_moderation(paragraph)
|
1234 |
verify_string_length_short(paragraph)
|
1235 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1236 |
user_content = f"""
|
1237 |
sys_content: {sys_content}
|
1238 |
---
|
1239 |
paragraph is: {paragraph}
|
1240 |
---
|
1241 |
{user_generate_paragraph_evaluate_prompt}
|
|
|
1242 |
"""
|
1243 |
total_content_text, content_table = get_chinese_paragraph_evaluate_content(thread_id, model, user_content, paragraph)
|
1244 |
|
@@ -1249,12 +1257,20 @@ def get_chinese_paragraph_refine_evaluate_content(thread_id, model, sys_content,
|
|
1249 |
verify_moderation(paragraph_2)
|
1250 |
verify_string_length_short(paragraph_2)
|
1251 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1252 |
user_content = f"""
|
1253 |
sys_content: {sys_content}
|
1254 |
---
|
1255 |
refined paragraph is: {paragraph_2}
|
1256 |
---
|
1257 |
-
{user_refine_paragraph_prompt}
|
|
|
1258 |
"""
|
1259 |
total_content_text, content_table = get_chinese_paragraph_evaluate_content(thread_id, model, user_content, paragraph_2)
|
1260 |
|
|
|
1233 |
verify_moderation(paragraph)
|
1234 |
verify_string_length_short(paragraph)
|
1235 |
|
1236 |
+
if len(paragraph) > 100 and len(paragraph) < 200:
|
1237 |
+
prompt_add = """
|
1238 |
+
目前提交字數在100-200字之間,主題與內容的評等最高只能是B+。
|
1239 |
+
"""
|
1240 |
+
else:
|
1241 |
+
prompt_add = ""
|
1242 |
+
|
1243 |
user_content = f"""
|
1244 |
sys_content: {sys_content}
|
1245 |
---
|
1246 |
paragraph is: {paragraph}
|
1247 |
---
|
1248 |
{user_generate_paragraph_evaluate_prompt}
|
1249 |
+
{prompt_add}
|
1250 |
"""
|
1251 |
total_content_text, content_table = get_chinese_paragraph_evaluate_content(thread_id, model, user_content, paragraph)
|
1252 |
|
|
|
1257 |
verify_moderation(paragraph_2)
|
1258 |
verify_string_length_short(paragraph_2)
|
1259 |
|
1260 |
+
if len(paragraph_2) > 100 and len(paragraph_2) < 200:
|
1261 |
+
prompt_add = """
|
1262 |
+
目前提交字數在100-200字之間,主題與內容的評等最高只能是B+。
|
1263 |
+
"""
|
1264 |
+
else:
|
1265 |
+
prompt_add = ""
|
1266 |
+
|
1267 |
user_content = f"""
|
1268 |
sys_content: {sys_content}
|
1269 |
---
|
1270 |
refined paragraph is: {paragraph_2}
|
1271 |
---
|
1272 |
+
{user_refine_paragraph_prompt}
|
1273 |
+
{prompt_add}
|
1274 |
"""
|
1275 |
total_content_text, content_table = get_chinese_paragraph_evaluate_content(thread_id, model, user_content, paragraph_2)
|
1276 |
|