PearlIsa commited on
Commit
424ddbc
β€’
1 Parent(s): 360f1f1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -512,7 +512,7 @@ class AdaptiveMedicalBot:
512
  conv_history = "\n".join([f"Patient: {h[0]}\nPearly: {h[1]}" for h in (history or [])])
513
 
514
  # Create dynamic prompt based on context
515
- prompt = f"""As Pearly, a compassionate NHS medical triage assistant, help assess the patient's needs and provide appropriate guidance.
516
 
517
  Previous Conversation:
518
  {conv_history}
@@ -525,7 +525,7 @@ class AdaptiveMedicalBot:
525
  Guidelines:
526
  - Show empathy and understanding
527
  - Ask relevant follow-up questions
528
- - Guide to appropriate care level (GP, NHS 111, emergency services)
529
  - Consider all aspects of patient care
530
  - Do not diagnose or recommend treatments
531
  - Focus on understanding concerns and proper healthcare guidance
@@ -679,12 +679,12 @@ def create_demo():
679
  gr.Radio(choices=["πŸ‘", "πŸ‘Ž"], label="Was this response helpful?", visible=True, value=None)
680
  ],
681
  outputs=[
682
- gr.Chatbot(label="NHS Medical Triage Assistant", height=500, type='messages'),
683
  gr.State([]) # For chat history (output)
684
  ],
685
- title="NHS Medical Triage Assistant - Pearly",
686
  description="""
687
- πŸ‘‹ Hello! I'm Pearly, your NHS medical assistant.
688
 
689
  I can help you with:
690
  β€’ Assessing your symptoms
@@ -693,7 +693,7 @@ def create_demo():
693
  β€’ General medical guidance
694
 
695
  For emergencies, always call 999.
696
- For urgent concerns, call NHS 111.
697
 
698
  Please describe your concerns below.
699
  """,
 
512
  conv_history = "\n".join([f"Patient: {h[0]}\nPearly: {h[1]}" for h in (history or [])])
513
 
514
  # Create dynamic prompt based on context
515
+ prompt = f"""As Pearly, a compassionate GP medical triage assistant, help assess the patient's needs and provide appropriate guidance.
516
 
517
  Previous Conversation:
518
  {conv_history}
 
525
  Guidelines:
526
  - Show empathy and understanding
527
  - Ask relevant follow-up questions
528
+ - Guide to appropriate care level (GP, 111, emergency services)
529
  - Consider all aspects of patient care
530
  - Do not diagnose or recommend treatments
531
  - Focus on understanding concerns and proper healthcare guidance
 
679
  gr.Radio(choices=["πŸ‘", "πŸ‘Ž"], label="Was this response helpful?", visible=True, value=None)
680
  ],
681
  outputs=[
682
+ gr.Chatbot(label="GP Medical Triage Assistant", height=500, type='messages'),
683
  gr.State([]) # For chat history (output)
684
  ],
685
+ title="GP Medical Triage Assistant - Pearly",
686
  description="""
687
+ πŸ‘‹ Hello! I'm Pearly, your GP medical assistant.
688
 
689
  I can help you with:
690
  β€’ Assessing your symptoms
 
693
  β€’ General medical guidance
694
 
695
  For emergencies, always call 999.
696
+ For urgent concerns, call 111.
697
 
698
  Please describe your concerns below.
699
  """,