Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,42 +2,42 @@ import streamlit as st
|
|
2 |
|
3 |
def triage_checkin():
|
4 |
st.write("### Triage and Check-in Expert ๐")
|
5 |
-
for i in range(1,
|
6 |
st.text_input(f"Question {i} for Triage")
|
7 |
|
8 |
def lab_analyst():
|
9 |
st.write("### Lab Analyst ๐งช")
|
10 |
-
for i in range(1,
|
11 |
st.text_input(f"Question {i} for Lab Analysis")
|
12 |
|
13 |
def medicine_specialist():
|
14 |
st.write("### Medicine Specialist ๐")
|
15 |
-
for i in range(1,
|
16 |
st.text_input(f"Question {i} for Medicine")
|
17 |
|
18 |
def service_expert():
|
19 |
st.write("### Service Expert ๐ฒ")
|
20 |
-
for i in range(1,
|
21 |
st.text_input(f"Question {i} for Service")
|
22 |
|
23 |
def care_expert():
|
24 |
st.write("### Level of Care Expert ๐ฅ")
|
25 |
-
for i in range(1,
|
26 |
st.text_input(f"Question {i} for Level of Care")
|
27 |
|
28 |
def terminology_expert():
|
29 |
st.write("### Terminology Expert ๐")
|
30 |
-
for i in range(1,
|
31 |
st.text_input(f"Question {i} for Terminology")
|
32 |
|
33 |
def cmo():
|
34 |
st.write("### Chief Medical Officer ๐ฉบ")
|
35 |
-
for i in range(1,
|
36 |
st.text_input(f"Question {i} for CMO")
|
37 |
|
38 |
def medical_director():
|
39 |
st.write("### Medical Director Team ๐ข")
|
40 |
-
for i in range(1,
|
41 |
st.text_input(f"Question {i} for Medical Director")
|
42 |
|
43 |
def main():
|
@@ -71,6 +71,52 @@ def main():
|
|
71 |
cmo()
|
72 |
elif role == "Medical Director Team":
|
73 |
medical_director()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
|
75 |
if __name__ == "__main__":
|
76 |
main()
|
|
|
2 |
|
3 |
def triage_checkin():
|
4 |
st.write("### Triage and Check-in Expert ๐")
|
5 |
+
for i in range(1, 4):
|
6 |
st.text_input(f"Question {i} for Triage")
|
7 |
|
8 |
def lab_analyst():
|
9 |
st.write("### Lab Analyst ๐งช")
|
10 |
+
for i in range(1, 4):
|
11 |
st.text_input(f"Question {i} for Lab Analysis")
|
12 |
|
13 |
def medicine_specialist():
|
14 |
st.write("### Medicine Specialist ๐")
|
15 |
+
for i in range(1, 4):
|
16 |
st.text_input(f"Question {i} for Medicine")
|
17 |
|
18 |
def service_expert():
|
19 |
st.write("### Service Expert ๐ฒ")
|
20 |
+
for i in range(1, 4):
|
21 |
st.text_input(f"Question {i} for Service")
|
22 |
|
23 |
def care_expert():
|
24 |
st.write("### Level of Care Expert ๐ฅ")
|
25 |
+
for i in range(1, 4):
|
26 |
st.text_input(f"Question {i} for Level of Care")
|
27 |
|
28 |
def terminology_expert():
|
29 |
st.write("### Terminology Expert ๐")
|
30 |
+
for i in range(1, 4):
|
31 |
st.text_input(f"Question {i} for Terminology")
|
32 |
|
33 |
def cmo():
|
34 |
st.write("### Chief Medical Officer ๐ฉบ")
|
35 |
+
for i in range(1, 4):
|
36 |
st.text_input(f"Question {i} for CMO")
|
37 |
|
38 |
def medical_director():
|
39 |
st.write("### Medical Director Team ๐ข")
|
40 |
+
for i in range(1, 4):
|
41 |
st.text_input(f"Question {i} for Medical Director")
|
42 |
|
43 |
def main():
|
|
|
71 |
cmo()
|
72 |
elif role == "Medical Director Team":
|
73 |
medical_director()
|
74 |
+
|
75 |
+
# Define Roles and their Descriptions
|
76 |
+
roles = {
|
77 |
+
"1. Coder": "๐ป Creates short python code functions to solve tasks.",
|
78 |
+
"2. Humanities Expert": "๐ Focuses on arts, literature, history, and other humanities subjects.",
|
79 |
+
"3. Analyst": "๐ค Analyzes situations and provides logical solutions.",
|
80 |
+
"4. Roleplay Expert": "๐ญ Specialized in mimicking behaviors or characters.",
|
81 |
+
"5. Mathematician": "โ Solves mathematical problems with precision.",
|
82 |
+
"6. STEM Expert": "๐ฌ Specialized in Science, Technology, Engineering, and Mathematics tasks.",
|
83 |
+
"7. Extraction Expert": "๐ Strictly sticks to facts and extracts concise information.",
|
84 |
+
"8. Drafter": "๐ Exhibits expertise in generating textual content and narratives.",
|
85 |
+
}
|
86 |
+
|
87 |
+
# Streamlit UI
|
88 |
+
st.title("AI Role Selector - CHARMSED ๐คโจ")
|
89 |
+
st.markdown("""
|
90 |
+
### Harness the power of AI with the CHARMSED framework.
|
91 |
+
#### This suite of roles brings together a comprehensive set of AI capabilities, tailored for diverse tasks:
|
92 |
+
- **C**oder ๐ป: Craft pythonic solutions with precision.
|
93 |
+
- **H**umanities Expert ๐: Dive deep into arts, literature, and history.
|
94 |
+
- **A**nalyst ๐ค: Derive insights through logical reasoning.
|
95 |
+
- **R**oleplay Expert ๐ญ: Mimic behaviors or adopt personas for engaging interactions.
|
96 |
+
- **M**athematician โ: Crunch numbers and solve mathematical enigmas.
|
97 |
+
- **S**TEM Expert ๐ฌ: Navigate through the realms of Science, Technology, Engineering, and Mathematics.
|
98 |
+
- **E**xtraction Expert ๐: Extract concise information with a laser-focus.
|
99 |
+
- **D**rafter ๐: Generate textual content and narratives with flair.
|
100 |
+
Empower your tasks with the perfect AI role and unleash the magic of CHARMSED!
|
101 |
+
""")
|
102 |
+
|
103 |
+
# Dropdown to select role
|
104 |
+
selected_role = st.selectbox("Select AI Role:", list(roles.keys()))
|
105 |
+
|
106 |
+
# Display the description of the selected role
|
107 |
+
st.write(roles[selected_role])
|
108 |
+
|
109 |
+
# Switch to choose between two models
|
110 |
+
model = st.radio("Choose Model:", ["model_1", "model_2"])
|
111 |
+
|
112 |
+
# Text area for user input
|
113 |
+
user_input = st.text_area("Provide your task/question:")
|
114 |
+
|
115 |
+
# Button to execute
|
116 |
+
if st.button("Execute"):
|
117 |
+
# Here, you would add code to get the AI response based on the selected role and model.
|
118 |
+
# For now, just echoing the user input.
|
119 |
+
st.write(f"You said: {user_input}")
|
120 |
|
121 |
if __name__ == "__main__":
|
122 |
main()
|