awacke1 commited on
Commit
7a7587c
Β·
1 Parent(s): baca0ed

Create backup.app.py

Browse files
Files changed (1) hide show
  1. backup.app.py +293 -0
backup.app.py ADDED
@@ -0,0 +1,293 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import streamlit.components.v1 as components
3
+
4
+
5
+ # Function to generate HTML with textarea
6
+ def generate_html_with_textarea(text_to_speak):
7
+ return f'''
8
+ <!DOCTYPE html>
9
+ <html>
10
+ <head>
11
+ <title>Read It Aloud</title>
12
+ <script type="text/javascript">
13
+ function readAloud() {{
14
+ const text = document.getElementById("textArea").value;
15
+ const speech = new SpeechSynthesisUtterance(text);
16
+ window.speechSynthesis.speak(speech);
17
+ }}
18
+ </script>
19
+ </head>
20
+ <body>
21
+ <h1>πŸ”Š Read It Aloud</h1>
22
+ <textarea id="textArea" rows="10" cols="80">{text_to_speak}</textarea>
23
+ <br>
24
+ <button onclick="readAloud()">πŸ”Š Read Aloud</button>
25
+ </body>
26
+ </html>
27
+ '''
28
+
29
+ def triage_checkin():
30
+ st.write("### Triage and Check-in Expert πŸš‘")
31
+ for i in range(1, 4):
32
+ st.text_input(f"Question {i} for Triage")
33
+
34
+ #List 10 responsibilities with emojis for experience needed to do: Triage and Check-in Expert
35
+ text_to_speak = """
36
+ 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:
37
+ 1. πŸ“Š Assessing patient symptoms and medical history to determine the appropriate triage category (e.g. emergency, urgent, routine) and assigning a triage score.
38
+ 2. πŸ“ˆ Entering patient information into the electronic medical record (EMR) and updating it as necessary.
39
+ 3. πŸ“ Verifying patient insurance information and ensuring that it is up-to-date.
40
+ 4. πŸ“ž Contacting patients to confirm appointments and provide reminders.
41
+ 5. πŸ”’ Securing patient information and maintaining confidentiality.
42
+ 6. πŸ“ˆ Monitoring patient flow and identifying areas for improvement in the check-in process.
43
+ 7. πŸ’‘ Providing excellent customer service and resolving any issues that may arise.
44
+ 8. πŸ“Š Maintaining accurate and up-to-date records of patient encounters.
45
+ 9. πŸ“Š Participating in quality improvement initiatives to improve the efficiency and effectiveness of the triage and check-in process.
46
+ 10. πŸ“ Collaborating with other healthcare professionals to ensure smooth patient flow and coordination of care.
47
+ """
48
+ html5=generate_html_with_textarea(text_to_speak)
49
+ components.html(html5, width=1280, height=1024)
50
+
51
+ def lab_analyst():
52
+ st.write("### Lab Analyst πŸ§ͺ")
53
+ for i in range(1, 4):
54
+ st.text_input(f"Question {i} for Lab Analysis")
55
+
56
+ #List 10 responsibilities with emojis for experience needed to do:
57
+ text_to_speak = """
58
+ Lab Analysts play a crucial role in the scientific analysis of samples. Responsibilities will include:
59
+ 1. πŸ”¬ Conducting complex tests and experiments on various samples.
60
+ 2. πŸ“Š Analyzing and interpreting data to make informed decisions.
61
+ 3. πŸ§ͺ Preparing reagents and samples for testing.
62
+ 4. πŸ’» Utilizing specialized laboratory software for data entry and analysis.
63
+ 5. πŸ“š Keeping abreast of latest industry developments and scientific literature.
64
+ 6. πŸ“ˆ Maintaining and calibrating lab equipment to ensure accuracy.
65
+ 7. πŸ“‹ Following stringent safety and quality control procedures.
66
+ 8. 🀝 Collaborating with fellow scientists and researchers.
67
+ 9. πŸ“ Preparing detailed reports on findings and recommendations.
68
+ 10. πŸŽ“ Staying updated with continuing education in the field.
69
+ """
70
+ html5=generate_html_with_textarea(text_to_speak)
71
+ components.html(html5, width=1280, height=1024)
72
+
73
+ def medicine_specialist():
74
+ st.write("### Medicine Specialist πŸ’Š")
75
+ for i in range(1, 4):
76
+ st.text_input(f"Question {i} for Medicine")
77
+
78
+
79
+ #List 10 responsibilities with emojis for experience needed to do:
80
+ text_to_speak = """
81
+ As a Medicine Specialist, your role is pivotal in providing expert medical care. Your responsibilities include:
82
+ 1. 🩺 Diagnosing and treating complex medical conditions.
83
+ 2. πŸ§‘β€βš•οΈ Providing specialized patient care and management.
84
+ 3. πŸ’Š Prescribing medications and monitoring their effects.
85
+ 4. πŸ“‹ Conducting thorough patient assessments and medical histories.
86
+ 5. 🀝 Collaborating with other healthcare professionals for comprehensive patient care.
87
+ 6. πŸ“š Keeping up-to-date with advancements in medical treatments and technologies.
88
+ 7. πŸ“ˆ Developing treatment plans based on up-to-date medical knowledge.
89
+ 8. πŸ—£οΈ Communicating effectively with patients and their families about medical conditions and treatment plans.
90
+ 9. πŸ“ Documenting all patient care and interactions accurately.
91
+ 10. πŸ§‘β€πŸ« Educating patients about disease prevention and health maintenance.
92
+ """
93
+ html5=generate_html_with_textarea(text_to_speak)
94
+ components.html(html5, width=1280, height=1024)
95
+
96
+ def service_expert():
97
+ st.write("### Service Expert πŸ’²")
98
+ for i in range(1, 4):
99
+ st.text_input(f"Question {i} for Service")
100
+
101
+
102
+ #List 10 responsibilities with emojis for experience needed to do:
103
+ text_to_speak = """
104
+ As a Service Expert πŸ’², your role is critical in ensuring customer satisfaction and maintaining service quality. Your responsibilities include:
105
+ 1. πŸ’² Providing expert advice on products and services to customers.
106
+ 2. 🀝 Building and maintaining strong customer relationships.
107
+ 3. πŸ“Š Analyzing customer feedback to improve service quality.
108
+ 4. πŸ“ˆ Developing strategies to increase customer satisfaction.
109
+ 5. πŸ“‹ Managing customer inquiries and resolving issues efficiently.
110
+ 6. πŸŽ“ Staying informed about new products and services.
111
+ 7. πŸ’Ό Collaborating with the sales team to meet customer needs.
112
+ 8. πŸ› οΈ Ensuring compliance with service standards and policies.
113
+ 9. πŸ“ Documenting customer interactions and transactions.
114
+ 10. πŸš€ Leading by example and setting high standards for customer service.
115
+ """
116
+ html5=generate_html_with_textarea(text_to_speak)
117
+ components.html(html5, width=1280, height=1024)
118
+
119
+ def care_expert():
120
+ st.write("### Level of Care Expert πŸ₯")
121
+ for i in range(1, 4):
122
+ st.text_input(f"Question {i} for Level of Care")
123
+
124
+
125
+ #List 10 responsibilities with emojis for experience needed to do:
126
+ text_to_speak = """
127
+ As a Level of Care Expert πŸ₯, your role is essential in determining the appropriate level of care for patients. Your responsibilities include:
128
+ 1. πŸ₯ Evaluating patient conditions and needs to determine the suitable level of care.
129
+ 2. πŸ“‹ Developing and updating care plans in collaboration with healthcare teams.
130
+ 3. πŸ’¬ Communicating effectively with patients and their families about care decisions.
131
+ 4. πŸ“Š Analyzing patient data to ensure optimal care delivery.
132
+ 5. 🀝 Coordinating with various healthcare professionals to provide integrated care.
133
+ 6. πŸ“š Staying informed about the latest healthcare policies and regulations.
134
+ 7. πŸ› οΈ Identifying opportunities for improving care processes and patient outcomes.
135
+ 8. πŸ“ˆ Monitoring and reporting on care quality metrics.
136
+ 9. πŸŽ“ Participating in educational programs to enhance professional knowledge.
137
+ 10. πŸ’‘ Providing guidance and training to staff on care standards and practices.
138
+ """
139
+ html5=generate_html_with_textarea(text_to_speak)
140
+ components.html(html5, width=1280, height=1024)
141
+
142
+ def terminology_expert():
143
+ st.write("### Terminology Expert πŸ“š")
144
+ for i in range(1, 4):
145
+ st.text_input(f"Question {i} for Terminology")
146
+
147
+
148
+ #List 10 responsibilities with emojis for experience needed to do:
149
+ text_to_speak = """
150
+ 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:
151
+ 1. 🧠 Mastering complex medical and behavioral health terminologies.
152
+ 2. πŸ“š Keeping up-to-date with the latest developments in medical language.
153
+ 3. πŸ–‹οΈ Assisting in the creation and review of medical documentation for accuracy.
154
+ 4. 🀝 Collaborating with healthcare professionals to ensure consistent use of terminology.
155
+ 5. πŸ’‘ Providing training and support to staff on medical terminology.
156
+ 6. πŸ“ˆ Analyzing and interpreting medical records for quality assurance.
157
+ 7. πŸ› οΈ Developing resources and tools to aid in the understanding of medical terms.
158
+ 8. πŸ“‹ Standardizing terminology usage across various healthcare departments.
159
+ 9. πŸ“Š Conducting research to expand the knowledge base of medical and behavioral health terms.
160
+ 10. πŸ—£οΈ Acting as a consultant for terminology-related inquiries and issues.
161
+ """
162
+
163
+ html5=generate_html_with_textarea(text_to_speak)
164
+ components.html(html5, width=1280, height=1024)
165
+
166
+ def cmo():
167
+ st.write("### Chief Medical Officer 🩺")
168
+ for i in range(1, 4):
169
+ st.text_input(f"Question {i} for CMO")
170
+
171
+
172
+ #List 10 responsibilities with emojis for experience needed to do:
173
+ text_to_speak = """
174
+ As a Chief Medical Officer (CMO) 🩺, you hold a crucial leadership position in the healthcare system. Your responsibilities include:
175
+ 1. 🩺 Overseeing the delivery of medical care across the organization.
176
+ 2. πŸ“Š Developing and implementing healthcare strategies and policies.
177
+ 3. πŸ’Ό Leading clinical teams and ensuring the highest standards of patient care.
178
+ 4. 🀝 Collaborating with other executives to align clinical and organizational goals.
179
+ 5. πŸ“š Staying informed about the latest healthcare trends and advancements.
180
+ 6. πŸ“ˆ Ensuring compliance with healthcare laws, regulations, and standards.
181
+ 7. πŸ—£οΈ Representing the medical staff in executive decision-making.
182
+ 8. πŸ“‹ Overseeing medical research and education programs.
183
+ 9. πŸ” Monitoring and improving the quality of healthcare services.
184
+ 10. πŸ§‘β€βš•οΈ Mentoring and developing healthcare professionals.
185
+ """
186
+ html5=generate_html_with_textarea(text_to_speak)
187
+ components.html(html5, width=1280, height=1024)
188
+
189
+ def medical_director():
190
+ st.write("### Medical Director Team 🏒")
191
+ for i in range(1, 4):
192
+ st.text_input(f"Question {i} for Medical Director")
193
+
194
+
195
+ #List 10 responsibilities with emojis for experience needed to do:
196
+ text_to_speak = """
197
+ As part of the Medical Director Team 🏒, you play a pivotal role in shaping the healthcare services of the organization. Your responsibilities include:
198
+ 1. 🏒 Leading and overseeing the medical department within the organization.
199
+ 2. πŸ“Š Developing strategies to enhance patient care and healthcare services.
200
+ 3. 🀝 Collaborating with other departments to integrate medical services with overall organizational goals.
201
+ 4. πŸ’Ό Managing clinical staff, including hiring, training, and performance evaluations.
202
+ 5. πŸ“š Keeping abreast of the latest medical research and advancements to inform practice and policy.
203
+ 6. πŸ“ˆ Monitoring and improving the quality and efficiency of medical services.
204
+ 7. πŸ—£οΈ Acting as a liaison between the medical staff and executive management.
205
+ 8. πŸ“‹ Ensuring compliance with healthcare regulations and standards.
206
+ 9. πŸ” Conducting regular reviews of clinical procedures and outcomes.
207
+ 10. πŸ§‘β€βš•οΈ Providing mentorship and leadership to medical professionals within the team.
208
+ """
209
+ html5=generate_html_with_textarea(text_to_speak)
210
+ components.html(html5, width=1280, height=1024)
211
+
212
+ def main():
213
+ st.title("10πŸŽ“MoEπŸš‘Medical Mixture of Experts Model")
214
+ st.write("Harness the power of AI with this specialized healthcare framework! πŸŽ‰")
215
+ 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.")
216
+ st.markdown("#### MTBench: https://huggingface.co/spaces/awacke1/MTBenchmarkForChatGPTMetricsScoring")
217
+
218
+ role = st.selectbox("Select AI Role:", [
219
+ "Triage and Check-in Expert",
220
+ "Lab Analyst",
221
+ "Medicine Specialist",
222
+ "Service Expert",
223
+ "Level of Care Expert",
224
+ "Terminology Expert",
225
+ "Chief Medical Officer",
226
+ "Medical Director Team"
227
+ ])
228
+
229
+ if role == "Triage and Check-in Expert":
230
+ triage_checkin()
231
+ elif role == "Lab Analyst":
232
+ lab_analyst()
233
+ elif role == "Medicine Specialist":
234
+ medicine_specialist()
235
+ elif role == "Service Expert":
236
+ service_expert()
237
+ elif role == "Level of Care Expert":
238
+ care_expert()
239
+ elif role == "Terminology Expert":
240
+ terminology_expert()
241
+ elif role == "Chief Medical Officer":
242
+ cmo()
243
+ elif role == "Medical Director Team":
244
+ medical_director()
245
+
246
+ # Define Roles and their Descriptions
247
+ roles = {
248
+ "1. Coder": "πŸ’» Creates short python code functions to solve tasks.",
249
+ "2. Humanities Expert": "πŸ“š Focuses on arts, literature, history, and other humanities subjects.",
250
+ "3. Analyst": "πŸ€” Analyzes situations and provides logical solutions.",
251
+ "4. Roleplay Expert": "🎭 Specialized in mimicking behaviors or characters.",
252
+ "5. Mathematician": "βž— Solves mathematical problems with precision.",
253
+ "6. STEM Expert": "πŸ”¬ Specialized in Science, Technology, Engineering, and Mathematics tasks.",
254
+ "7. Extraction Expert": "πŸ” Strictly sticks to facts and extracts concise information.",
255
+ "8. Drafter": "πŸ“ Exhibits expertise in generating textual content and narratives.",
256
+ }
257
+
258
+ # Streamlit UI
259
+ st.title("AI Role Selector - CHARMSED πŸ€–βœ¨")
260
+ st.markdown("""
261
+ ### Harness the power of AI with the CHARMSED framework.
262
+ #### This suite of roles brings together a comprehensive set of AI capabilities, tailored for diverse tasks:
263
+ - **C**oder πŸ’»: Craft pythonic solutions with precision.
264
+ - **H**umanities Expert πŸ“š: Dive deep into arts, literature, and history.
265
+ - **A**nalyst πŸ€”: Derive insights through logical reasoning.
266
+ - **R**oleplay Expert 🎭: Mimic behaviors or adopt personas for engaging interactions.
267
+ - **M**athematician βž—: Crunch numbers and solve mathematical enigmas.
268
+ - **S**TEM Expert πŸ”¬: Navigate through the realms of Science, Technology, Engineering, and Mathematics.
269
+ - **E**xtraction Expert πŸ”: Extract concise information with a laser-focus.
270
+ - **D**rafter πŸ“: Generate textual content and narratives with flair.
271
+ Empower your tasks with the perfect AI role and unleash the magic of CHARMSED!
272
+ """)
273
+
274
+ # Dropdown to select role
275
+ selected_role = st.selectbox("Select AI Role:", list(roles.keys()))
276
+
277
+ # Display the description of the selected role
278
+ st.write(roles[selected_role])
279
+
280
+ # Switch to choose between two models
281
+ model = st.radio("Choose Model:", ["model_1", "model_2"])
282
+
283
+ # Text area for user input
284
+ user_input = st.text_area("Provide your task/question:")
285
+
286
+ # Button to execute
287
+ if st.button("Execute"):
288
+ # Here, you would add code to get the AI response based on the selected role and model.
289
+ # For now, just echoing the user input.
290
+ st.write(f"You said: {user_input}")
291
+
292
+ if __name__ == "__main__":
293
+ main()