Update app.py
Browse files
app.py
CHANGED
|
@@ -1275,7 +1275,7 @@ def chat_or_recommend(req: ChatOrRecommendRequest):
|
|
| 1275 |
top_items = recommend_content_based(user_profile, top_n=5)
|
| 1276 |
|
| 1277 |
rec_results = []
|
| 1278 |
-
recommendation_msg = "
|
| 1279 |
for i, (item, score) in enumerate(top_items, start=1):
|
| 1280 |
clean_desc = re.sub(r"\(.*?\)", "", item["desc"]).strip()
|
| 1281 |
rec_results.append({
|
|
@@ -1328,7 +1328,7 @@ def chat_or_recommend(req: ChatOrRecommendRequest):
|
|
| 1328 |
}
|
| 1329 |
top_items = recommend_content_based(user_profile, top_n=5)
|
| 1330 |
|
| 1331 |
-
recommendation_msg = "
|
| 1332 |
for i, (item, score) in enumerate(top_items, start=1):
|
| 1333 |
clean_desc = re.sub(r"\(.*?\)", "", item["desc"]).strip()
|
| 1334 |
recommendations_list.append({
|
|
@@ -1339,7 +1339,7 @@ def chat_or_recommend(req: ChatOrRecommendRequest):
|
|
| 1339 |
"score": round(score, 4)
|
| 1340 |
})
|
| 1341 |
recommendation_msg += f"{i}. **{item['title']}** - {clean_desc}\n"
|
| 1342 |
-
recommendation_msg += "\nμ΄ μ€μμ μ΄λ€ νλμ΄ κ°μ₯
|
| 1343 |
|
| 1344 |
# 5) μ΅μ’
μλ΅ κ²°ν©
|
| 1345 |
final_response = counseling_response + chatbot_msg
|
|
|
|
| 1275 |
top_items = recommend_content_based(user_profile, top_n=5)
|
| 1276 |
|
| 1277 |
rec_results = []
|
| 1278 |
+
recommendation_msg = "λλ₯Ό μν μΆμ² λͺ©λ‘μ΄μΌ"
|
| 1279 |
for i, (item, score) in enumerate(top_items, start=1):
|
| 1280 |
clean_desc = re.sub(r"\(.*?\)", "", item["desc"]).strip()
|
| 1281 |
rec_results.append({
|
|
|
|
| 1328 |
}
|
| 1329 |
top_items = recommend_content_based(user_profile, top_n=5)
|
| 1330 |
|
| 1331 |
+
recommendation_msg = "λλ₯Ό μν λ§μΆ€ μΆμ² λͺ©λ‘μ μλ €μ€κ²! βΊοΈ"
|
| 1332 |
for i, (item, score) in enumerate(top_items, start=1):
|
| 1333 |
clean_desc = re.sub(r"\(.*?\)", "", item["desc"]).strip()
|
| 1334 |
recommendations_list.append({
|
|
|
|
| 1339 |
"score": round(score, 4)
|
| 1340 |
})
|
| 1341 |
recommendation_msg += f"{i}. **{item['title']}** - {clean_desc}\n"
|
| 1342 |
+
recommendation_msg += "\nμ΄ μ€μμ μ΄λ€ νλμ΄ κ°μ₯ λ§μμ λ€μ΄? π"
|
| 1343 |
|
| 1344 |
# 5) μ΅μ’
μλ΅ κ²°ν©
|
| 1345 |
final_response = counseling_response + chatbot_msg
|