UKURIKIYEYEZU commited on
Commit
faf6c7b
·
verified ·
1 Parent(s): 87d72d5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -8
app.py CHANGED
@@ -278,7 +278,6 @@ You are a compassionate and supportive AI assistant specializing in helping indi
278
  When responding to {first_name}, follow these guidelines:
279
 
280
  1. **Emotional Intelligence**
281
- - Begin by recognizing any emotions expressed (e.g., "I hear that you're feeling overwhelmed")
282
  - Validate feelings without judgment (e.g., "It's completely understandable to feel this way")
283
  - Offer reassurance when appropriate, always centered on empowerment
284
  - Adjust your tone based on the emotional state conveyed
@@ -291,7 +290,7 @@ When responding to {first_name}, follow these guidelines:
291
 
292
  3. **Conversation Management**
293
  - Refer to {conversation_history} to maintain continuity and avoid repetition
294
- - Keep responses concise (1-3 sentences) unless greater detail is explicitly requested
295
  - Use clear paragraph breaks for readability
296
  - Prioritize immediate concerns before addressing secondary issues
297
 
@@ -337,8 +336,8 @@ class OpenRouterLLM:
337
  def stream(self, prompt: str) -> Iterator[str]:
338
  try:
339
  completion = self.client.chat.completions.create(
340
- #model="deepseek/deepseek-r1-distill-llama-70b:free",
341
- model="meta-llama/llama-3.3-70b-instruct:free",
342
  messages=[{"role": "user", "content": prompt}],
343
  stream=True
344
  )
@@ -550,7 +549,6 @@ def chatbot_interface():
550
  When responding to {first_name}, follow these guidelines:
551
 
552
  1. **Emotional Intelligence**
553
- - Begin by recognizing any emotions expressed (e.g., "I hear that you're feeling overwhelmed")
554
  - Validate feelings without judgment (e.g., "It's completely understandable to feel this way")
555
  - Offer reassurance when appropriate, always centered on empowerment
556
  - Adjust your tone based on the emotional state conveyed
@@ -563,7 +561,7 @@ def chatbot_interface():
563
 
564
  3. **Conversation Management**
565
  - Refer to {conversation_history} to maintain continuity and avoid repetition
566
- - Keep responses concise (1-3 sentences) unless greater detail is explicitly requested
567
  - Use clear paragraph breaks for readability
568
  - Prioritize immediate concerns before addressing secondary issues
569
 
@@ -598,7 +596,7 @@ def chatbot_interface():
598
  with gr.Row():
599
  first_name = gr.Textbox(
600
  label="Nickname",
601
- placeholder="Enter your Nickname",
602
  scale=1,
603
  elem_id="input_nickname"
604
  )
@@ -617,7 +615,7 @@ def chatbot_interface():
617
  )
618
 
619
  # Footer with version info
620
- gr.Markdown("Ijwi ry'Ubufasha Chatbot v1.0.1 © 2025")
621
 
622
  # Handle user registration
623
  submit_btn.click(
 
278
  When responding to {first_name}, follow these guidelines:
279
 
280
  1. **Emotional Intelligence**
 
281
  - Validate feelings without judgment (e.g., "It's completely understandable to feel this way")
282
  - Offer reassurance when appropriate, always centered on empowerment
283
  - Adjust your tone based on the emotional state conveyed
 
290
 
291
  3. **Conversation Management**
292
  - Refer to {conversation_history} to maintain continuity and avoid repetition
293
+ - Keep responses concise (1-4 sentences) unless greater detail is explicitly requested
294
  - Use clear paragraph breaks for readability
295
  - Prioritize immediate concerns before addressing secondary issues
296
 
 
336
  def stream(self, prompt: str) -> Iterator[str]:
337
  try:
338
  completion = self.client.chat.completions.create(
339
+ model="deepseek/deepseek-r1-distill-llama-70b:free",
340
+ #model="meta-llama/llama-3.3-70b-instruct:free",
341
  messages=[{"role": "user", "content": prompt}],
342
  stream=True
343
  )
 
549
  When responding to {first_name}, follow these guidelines:
550
 
551
  1. **Emotional Intelligence**
 
552
  - Validate feelings without judgment (e.g., "It's completely understandable to feel this way")
553
  - Offer reassurance when appropriate, always centered on empowerment
554
  - Adjust your tone based on the emotional state conveyed
 
561
 
562
  3. **Conversation Management**
563
  - Refer to {conversation_history} to maintain continuity and avoid repetition
564
+ - Keep responses concise (1-4 sentences) unless greater detail is explicitly requested
565
  - Use clear paragraph breaks for readability
566
  - Prioritize immediate concerns before addressing secondary issues
567
 
 
596
  with gr.Row():
597
  first_name = gr.Textbox(
598
  label="Nickname",
599
+ placeholder="Enter your Nickname You feel comfy",
600
  scale=1,
601
  elem_id="input_nickname"
602
  )
 
615
  )
616
 
617
  # Footer with version info
618
+ gr.Markdown("Ijwi ry'Ubufasha Chatbot v1.0.0 © 2025")
619
 
620
  # Handle user registration
621
  submit_btn.click(