Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -307,7 +307,7 @@ When responding to {first_name}, follow these guidelines:
|
|
307 |
- Avoid phrases that could minimize experiences or create pressure
|
308 |
- Include gentle reminders about professional help when discussing serious issues
|
309 |
|
310 |
-
Your response should balance emotional support with practical guidance
|
311 |
|
312 |
**Context:** {context}
|
313 |
**User's Question:** {question}
|
@@ -408,13 +408,13 @@ class UserSession:
|
|
408 |
def set_welcome_message(self, Nickname, src_lang="eng_Latn", tgt_lang="kin_Latn"):
|
409 |
"""Set a dynamic welcome message using the OpenRouterLLM."""
|
410 |
prompt = (
|
411 |
-
f"Create a very brief welcome message for {Nickname}
|
412 |
f"The message should: "
|
413 |
f"1. Welcome {Nickname} warmly and professionally. "
|
414 |
f"2. Emphasize that this is a safe and trusted space. "
|
415 |
f"3. Highlight specialized support for gender-based violence (GBV) and legal assistance. "
|
416 |
f"4. Use a tone that is warm, reassuring, and professional. "
|
417 |
-
f"5. Keep the message concise and impactful
|
418 |
)
|
419 |
|
420 |
# Use the OpenRouterLLM to generate the message
|
@@ -423,8 +423,6 @@ class UserSession:
|
|
423 |
|
424 |
# Format the message with HTML styling
|
425 |
self.welcome_message = (
|
426 |
-
f"<div style='font-size: 24px; font-weight: bold; color: #2E86C1;'>"
|
427 |
-
f"Welcome {Nickname}! 👋</div>"
|
428 |
f"<div style='font-size: 20px;'>"
|
429 |
f"{welcome_text}"
|
430 |
f"</div>"
|
@@ -603,7 +601,7 @@ def chatbot_interface():
|
|
603 |
- Avoid phrases that could minimize experiences or create pressure
|
604 |
- Include gentle reminders about professional help when discussing serious issues
|
605 |
|
606 |
-
Your response should balance emotional support with practical guidance
|
607 |
"""
|
608 |
|
609 |
|
|
|
307 |
- Avoid phrases that could minimize experiences or create pressure
|
308 |
- Include gentle reminders about professional help when discussing serious issues
|
309 |
|
310 |
+
Your response should balance emotional support with practical guidance.
|
311 |
|
312 |
**Context:** {context}
|
313 |
**User's Question:** {question}
|
|
|
408 |
def set_welcome_message(self, Nickname, src_lang="eng_Latn", tgt_lang="kin_Latn"):
|
409 |
"""Set a dynamic welcome message using the OpenRouterLLM."""
|
410 |
prompt = (
|
411 |
+
f"Create a very brief welcome message for {Nickname}. "
|
412 |
f"The message should: "
|
413 |
f"1. Welcome {Nickname} warmly and professionally. "
|
414 |
f"2. Emphasize that this is a safe and trusted space. "
|
415 |
f"3. Highlight specialized support for gender-based violence (GBV) and legal assistance. "
|
416 |
f"4. Use a tone that is warm, reassuring, and professional. "
|
417 |
+
f"5. Keep the message concise and impactful."
|
418 |
)
|
419 |
|
420 |
# Use the OpenRouterLLM to generate the message
|
|
|
423 |
|
424 |
# Format the message with HTML styling
|
425 |
self.welcome_message = (
|
|
|
|
|
426 |
f"<div style='font-size: 20px;'>"
|
427 |
f"{welcome_text}"
|
428 |
f"</div>"
|
|
|
601 |
- Avoid phrases that could minimize experiences or create pressure
|
602 |
- Include gentle reminders about professional help when discussing serious issues
|
603 |
|
604 |
+
Your response should balance emotional support with practical guidance.
|
605 |
"""
|
606 |
|
607 |
|