Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -506,10 +506,15 @@ system_prompt_scenario = """λΉμ μ μμ μ€ν¬λ¦½νΈμ λ§λ λ°°κ²½ μ
|
|
| 506 |
|
| 507 |
|
| 508 |
def analyze_scenario(scenario):
|
| 509 |
-
"""μλ리μ€λ₯Ό λΆμνμ¬
|
| 510 |
messages = [
|
| 511 |
{"role": "system", "content": system_prompt_scenario},
|
| 512 |
-
{"role": "user", "content":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 513 |
]
|
| 514 |
|
| 515 |
try:
|
|
@@ -520,7 +525,7 @@ def analyze_scenario(scenario):
|
|
| 520 |
)
|
| 521 |
prompts = response.choices[0].message.content.strip().split("\n\n")
|
| 522 |
|
| 523 |
-
#
|
| 524 |
section_prompts = []
|
| 525 |
current_section = ""
|
| 526 |
for line in prompts:
|
|
@@ -534,7 +539,6 @@ def analyze_scenario(scenario):
|
|
| 534 |
if current_section:
|
| 535 |
section_prompts.append(current_section)
|
| 536 |
|
| 537 |
-
# μ νν 5κ°μ μΉμ
μ΄ λλλ‘ μ‘°μ
|
| 538 |
while len(section_prompts) < 5:
|
| 539 |
section_prompts.append("μΆκ° μΉμ
μ΄ νμν©λλ€.")
|
| 540 |
return section_prompts[:5]
|
|
|
|
| 506 |
|
| 507 |
|
| 508 |
def analyze_scenario(scenario):
|
| 509 |
+
"""μλ리μ€λ₯Ό λΆμνμ¬ λ°°κ²½ μμμ© ν둬ννΈ μμ±"""
|
| 510 |
messages = [
|
| 511 |
{"role": "system", "content": system_prompt_scenario},
|
| 512 |
+
{"role": "user", "content": f"""
|
| 513 |
+
λ€μ μ€ν¬λ¦½νΈμ λΆμκΈ°μ κ°μ±μ ννν μ μλ λ°°κ²½ μμ ν둬ννΈλ₯Ό μμ±ν΄μ£ΌμΈμ:
|
| 514 |
+
|
| 515 |
+
{scenario}
|
| 516 |
+
|
| 517 |
+
κ° μΉμ
λ³λ‘ μ§μ μ μΈ μ ν λ¬μ¬λ νΌνκ³ , μ€ν¬λ¦½νΈμ κ°μ±μ νννλ λ°°κ²½ μμμ μ§μ€ν΄μ£ΌμΈμ."""},
|
| 518 |
]
|
| 519 |
|
| 520 |
try:
|
|
|
|
| 525 |
)
|
| 526 |
prompts = response.choices[0].message.content.strip().split("\n\n")
|
| 527 |
|
| 528 |
+
# ν둬ννΈ μ²λ¦¬ λ‘μ§μ λμΌ
|
| 529 |
section_prompts = []
|
| 530 |
current_section = ""
|
| 531 |
for line in prompts:
|
|
|
|
| 539 |
if current_section:
|
| 540 |
section_prompts.append(current_section)
|
| 541 |
|
|
|
|
| 542 |
while len(section_prompts) < 5:
|
| 543 |
section_prompts.append("μΆκ° μΉμ
μ΄ νμν©λλ€.")
|
| 544 |
return section_prompts[:5]
|