awacke1's picture
Update app.py
baca0ed
import streamlit as st
import streamlit.components.v1 as components
# Function to generate HTML with textarea
def generate_html_with_textarea(text_to_speak):
return f'''
<!DOCTYPE html>
<html>
<head>
<title>Read It Aloud</title>
<script type="text/javascript">
function readAloud() {{
const text = document.getElementById("textArea").value;
const speech = new SpeechSynthesisUtterance(text);
window.speechSynthesis.speak(speech);
}}
</script>
</head>
<body>
<h1>πŸ”Š Read It Aloud</h1>
<textarea id="textArea" rows="10" cols="80">{text_to_speak}</textarea>
<br>
<button onclick="readAloud()">πŸ”Š Read Aloud</button>
</body>
</html>
'''
def triage_checkin():
st.write("### Triage and Check-in Expert πŸš‘")
for i in range(1, 4):
st.text_input(f"Question {i} for Triage")
#List 10 responsibilities with emojis for experience needed to do: Triage and Check-in Expert
text_to_speak = """
As a triage and check-in expert, you will be responsible for ensuring that patients are properly assessed and checked in for their appointments. This involves a range of tasks, including:
1. πŸ“Š Assessing patient symptoms and medical history to determine the appropriate triage category (e.g. emergency, urgent, routine) and assigning a triage score.
2. πŸ“ˆ Entering patient information into the electronic medical record (EMR) and updating it as necessary.
3. πŸ“ Verifying patient insurance information and ensuring that it is up-to-date.
4. πŸ“ž Contacting patients to confirm appointments and provide reminders.
5. πŸ”’ Securing patient information and maintaining confidentiality.
6. πŸ“ˆ Monitoring patient flow and identifying areas for improvement in the check-in process.
7. πŸ’‘ Providing excellent customer service and resolving any issues that may arise.
8. πŸ“Š Maintaining accurate and up-to-date records of patient encounters.
9. πŸ“Š Participating in quality improvement initiatives to improve the efficiency and effectiveness of the triage and check-in process.
10. πŸ“ Collaborating with other healthcare professionals to ensure smooth patient flow and coordination of care.
"""
html5=generate_html_with_textarea(text_to_speak)
components.html(html5, width=1280, height=1024)
def lab_analyst():
st.write("### Lab Analyst πŸ§ͺ")
for i in range(1, 4):
st.text_input(f"Question {i} for Lab Analysis")
#List 10 responsibilities with emojis for experience needed to do:
text_to_speak = """
Lab Analysts play a crucial role in the scientific analysis of samples. Responsibilities will include:
1. πŸ”¬ Conducting complex tests and experiments on various samples.
2. πŸ“Š Analyzing and interpreting data to make informed decisions.
3. πŸ§ͺ Preparing reagents and samples for testing.
4. πŸ’» Utilizing specialized laboratory software for data entry and analysis.
5. πŸ“š Keeping abreast of latest industry developments and scientific literature.
6. πŸ“ˆ Maintaining and calibrating lab equipment to ensure accuracy.
7. πŸ“‹ Following stringent safety and quality control procedures.
8. 🀝 Collaborating with fellow scientists and researchers.
9. πŸ“ Preparing detailed reports on findings and recommendations.
10. πŸŽ“ Staying updated with continuing education in the field.
"""
html5=generate_html_with_textarea(text_to_speak)
components.html(html5, width=1280, height=1024)
def medicine_specialist():
st.write("### Medicine Specialist πŸ’Š")
for i in range(1, 4):
st.text_input(f"Question {i} for Medicine")
#List 10 responsibilities with emojis for experience needed to do:
text_to_speak = """
As a Medicine Specialist, your role is pivotal in providing expert medical care. Your responsibilities include:
1. 🩺 Diagnosing and treating complex medical conditions.
2. πŸ§‘β€βš•οΈ Providing specialized patient care and management.
3. πŸ’Š Prescribing medications and monitoring their effects.
4. πŸ“‹ Conducting thorough patient assessments and medical histories.
5. 🀝 Collaborating with other healthcare professionals for comprehensive patient care.
6. πŸ“š Keeping up-to-date with advancements in medical treatments and technologies.
7. πŸ“ˆ Developing treatment plans based on up-to-date medical knowledge.
8. πŸ—£οΈ Communicating effectively with patients and their families about medical conditions and treatment plans.
9. πŸ“ Documenting all patient care and interactions accurately.
10. πŸ§‘β€πŸ« Educating patients about disease prevention and health maintenance.
"""
html5=generate_html_with_textarea(text_to_speak)
components.html(html5, width=1280, height=1024)
def service_expert():
st.write("### Service Expert πŸ’²")
for i in range(1, 4):
st.text_input(f"Question {i} for Service")
#List 10 responsibilities with emojis for experience needed to do:
text_to_speak = """
As a Service Expert πŸ’², your role is critical in ensuring customer satisfaction and maintaining service quality. Your responsibilities include:
1. πŸ’² Providing expert advice on products and services to customers.
2. 🀝 Building and maintaining strong customer relationships.
3. πŸ“Š Analyzing customer feedback to improve service quality.
4. πŸ“ˆ Developing strategies to increase customer satisfaction.
5. πŸ“‹ Managing customer inquiries and resolving issues efficiently.
6. πŸŽ“ Staying informed about new products and services.
7. πŸ’Ό Collaborating with the sales team to meet customer needs.
8. πŸ› οΈ Ensuring compliance with service standards and policies.
9. πŸ“ Documenting customer interactions and transactions.
10. πŸš€ Leading by example and setting high standards for customer service.
"""
html5=generate_html_with_textarea(text_to_speak)
components.html(html5, width=1280, height=1024)
def care_expert():
st.write("### Level of Care Expert πŸ₯")
for i in range(1, 4):
st.text_input(f"Question {i} for Level of Care")
#List 10 responsibilities with emojis for experience needed to do:
text_to_speak = """
As a Level of Care Expert πŸ₯, your role is essential in determining the appropriate level of care for patients. Your responsibilities include:
1. πŸ₯ Evaluating patient conditions and needs to determine the suitable level of care.
2. πŸ“‹ Developing and updating care plans in collaboration with healthcare teams.
3. πŸ’¬ Communicating effectively with patients and their families about care decisions.
4. πŸ“Š Analyzing patient data to ensure optimal care delivery.
5. 🀝 Coordinating with various healthcare professionals to provide integrated care.
6. πŸ“š Staying informed about the latest healthcare policies and regulations.
7. πŸ› οΈ Identifying opportunities for improving care processes and patient outcomes.
8. πŸ“ˆ Monitoring and reporting on care quality metrics.
9. πŸŽ“ Participating in educational programs to enhance professional knowledge.
10. πŸ’‘ Providing guidance and training to staff on care standards and practices.
"""
html5=generate_html_with_textarea(text_to_speak)
components.html(html5, width=1280, height=1024)
def terminology_expert():
st.write("### Terminology Expert πŸ“š")
for i in range(1, 4):
st.text_input(f"Question {i} for Terminology")
#List 10 responsibilities with emojis for experience needed to do:
text_to_speak = """
As a Terminology Expert in Medical and Behavioral Health Care, your role involves a deep understanding of medical terminology and its application. Your responsibilities include:
1. 🧠 Mastering complex medical and behavioral health terminologies.
2. πŸ“š Keeping up-to-date with the latest developments in medical language.
3. πŸ–‹οΈ Assisting in the creation and review of medical documentation for accuracy.
4. 🀝 Collaborating with healthcare professionals to ensure consistent use of terminology.
5. πŸ’‘ Providing training and support to staff on medical terminology.
6. πŸ“ˆ Analyzing and interpreting medical records for quality assurance.
7. πŸ› οΈ Developing resources and tools to aid in the understanding of medical terms.
8. πŸ“‹ Standardizing terminology usage across various healthcare departments.
9. πŸ“Š Conducting research to expand the knowledge base of medical and behavioral health terms.
10. πŸ—£οΈ Acting as a consultant for terminology-related inquiries and issues.
"""
html5=generate_html_with_textarea(text_to_speak)
components.html(html5, width=1280, height=1024)
def cmo():
st.write("### Chief Medical Officer 🩺")
for i in range(1, 4):
st.text_input(f"Question {i} for CMO")
#List 10 responsibilities with emojis for experience needed to do:
text_to_speak = """
As a Chief Medical Officer (CMO) 🩺, you hold a crucial leadership position in the healthcare system. Your responsibilities include:
1. 🩺 Overseeing the delivery of medical care across the organization.
2. πŸ“Š Developing and implementing healthcare strategies and policies.
3. πŸ’Ό Leading clinical teams and ensuring the highest standards of patient care.
4. 🀝 Collaborating with other executives to align clinical and organizational goals.
5. πŸ“š Staying informed about the latest healthcare trends and advancements.
6. πŸ“ˆ Ensuring compliance with healthcare laws, regulations, and standards.
7. πŸ—£οΈ Representing the medical staff in executive decision-making.
8. πŸ“‹ Overseeing medical research and education programs.
9. πŸ” Monitoring and improving the quality of healthcare services.
10. πŸ§‘β€βš•οΈ Mentoring and developing healthcare professionals.
"""
html5=generate_html_with_textarea(text_to_speak)
components.html(html5, width=1280, height=1024)
def medical_director():
st.write("### Medical Director Team 🏒")
for i in range(1, 4):
st.text_input(f"Question {i} for Medical Director")
#List 10 responsibilities with emojis for experience needed to do:
text_to_speak = """
As part of the Medical Director Team 🏒, you play a pivotal role in shaping the healthcare services of the organization. Your responsibilities include:
1. 🏒 Leading and overseeing the medical department within the organization.
2. πŸ“Š Developing strategies to enhance patient care and healthcare services.
3. 🀝 Collaborating with other departments to integrate medical services with overall organizational goals.
4. πŸ’Ό Managing clinical staff, including hiring, training, and performance evaluations.
5. πŸ“š Keeping abreast of the latest medical research and advancements to inform practice and policy.
6. πŸ“ˆ Monitoring and improving the quality and efficiency of medical services.
7. πŸ—£οΈ Acting as a liaison between the medical staff and executive management.
8. πŸ“‹ Ensuring compliance with healthcare regulations and standards.
9. πŸ” Conducting regular reviews of clinical procedures and outcomes.
10. πŸ§‘β€βš•οΈ Providing mentorship and leadership to medical professionals within the team.
"""
html5=generate_html_with_textarea(text_to_speak)
components.html(html5, width=1280, height=1024)
def main():
st.title("10πŸŽ“MoEπŸš‘Medical Mixture of Experts Model")
st.write("Harness the power of AI with this specialized healthcare framework! πŸŽ‰")
st.write("#### In LLM Multi System Agents, we define a set of eight roles for achieving a mission, then benchmark performance across LLMs to find datasets with need alignment.")
st.markdown("#### MTBench: https://huggingface.co/spaces/awacke1/MTBenchmarkForChatGPTMetricsScoring")
role = st.selectbox("Select AI Role:", [
"Triage and Check-in Expert",
"Lab Analyst",
"Medicine Specialist",
"Service Expert",
"Level of Care Expert",
"Terminology Expert",
"Chief Medical Officer",
"Medical Director Team"
])
if role == "Triage and Check-in Expert":
triage_checkin()
elif role == "Lab Analyst":
lab_analyst()
elif role == "Medicine Specialist":
medicine_specialist()
elif role == "Service Expert":
service_expert()
elif role == "Level of Care Expert":
care_expert()
elif role == "Terminology Expert":
terminology_expert()
elif role == "Chief Medical Officer":
cmo()
elif role == "Medical Director Team":
medical_director()
# Define Roles and their Descriptions
roles = {
"1. Coder": "πŸ’» Creates short python code functions to solve tasks.",
"2. Humanities Expert": "πŸ“š Focuses on arts, literature, history, and other humanities subjects.",
"3. Analyst": "πŸ€” Analyzes situations and provides logical solutions.",
"4. Roleplay Expert": "🎭 Specialized in mimicking behaviors or characters.",
"5. Mathematician": "βž— Solves mathematical problems with precision.",
"6. STEM Expert": "πŸ”¬ Specialized in Science, Technology, Engineering, and Mathematics tasks.",
"7. Extraction Expert": "πŸ” Strictly sticks to facts and extracts concise information.",
"8. Drafter": "πŸ“ Exhibits expertise in generating textual content and narratives.",
}
# Streamlit UI
st.title("AI Role Selector - CHARMSED πŸ€–βœ¨")
st.markdown("""
### Harness the power of AI with the CHARMSED framework.
#### This suite of roles brings together a comprehensive set of AI capabilities, tailored for diverse tasks:
- **C**oder πŸ’»: Craft pythonic solutions with precision.
- **H**umanities Expert πŸ“š: Dive deep into arts, literature, and history.
- **A**nalyst πŸ€”: Derive insights through logical reasoning.
- **R**oleplay Expert 🎭: Mimic behaviors or adopt personas for engaging interactions.
- **M**athematician βž—: Crunch numbers and solve mathematical enigmas.
- **S**TEM Expert πŸ”¬: Navigate through the realms of Science, Technology, Engineering, and Mathematics.
- **E**xtraction Expert πŸ”: Extract concise information with a laser-focus.
- **D**rafter πŸ“: Generate textual content and narratives with flair.
Empower your tasks with the perfect AI role and unleash the magic of CHARMSED!
""")
# Dropdown to select role
selected_role = st.selectbox("Select AI Role:", list(roles.keys()))
# Display the description of the selected role
st.write(roles[selected_role])
# Switch to choose between two models
model = st.radio("Choose Model:", ["model_1", "model_2"])
# Text area for user input
user_input = st.text_area("Provide your task/question:")
# Button to execute
if st.button("Execute"):
# Here, you would add code to get the AI response based on the selected role and model.
# For now, just echoing the user input.
st.write(f"You said: {user_input}")
if __name__ == "__main__":
main()