Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -141,7 +141,9 @@ def link_button_with_emoji(url, title, emoji_summary):
|
|
| 141 |
random_emoji = random.choice(emojis)
|
| 142 |
st.markdown(f"[{random_emoji} {emoji_summary} - {title}]({url})")
|
| 143 |
|
| 144 |
-
|
|
|
|
|
|
|
| 145 |
|
| 146 |
# Homunculus parts and their corresponding emojis
|
| 147 |
homunculus_parts = {
|
|
@@ -185,17 +187,53 @@ def display_homunculus_parts():
|
|
| 185 |
st.write(f"Details about the {part}")
|
| 186 |
|
| 187 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 188 |
|
| 189 |
|
| 190 |
# Define function to add paper buttons and links
|
| 191 |
def add_paper_buttons_and_links():
|
| 192 |
|
| 193 |
-
|
| 194 |
-
page = st.sidebar.radio("Choose a page:", ["Homunculus Model"])
|
| 195 |
-
if page == "Homunculus Model":
|
| 196 |
display_homunculus_parts()
|
|
|
|
|
|
|
| 197 |
|
| 198 |
-
|
| 199 |
col1, col2, col3, col4 = st.columns(4)
|
| 200 |
|
| 201 |
with col1:
|
|
|
|
| 141 |
random_emoji = random.choice(emojis)
|
| 142 |
st.markdown(f"[{random_emoji} {emoji_summary} - {title}]({url})")
|
| 143 |
|
| 144 |
+
|
| 145 |
+
|
| 146 |
+
|
| 147 |
|
| 148 |
# Homunculus parts and their corresponding emojis
|
| 149 |
homunculus_parts = {
|
|
|
|
| 187 |
st.write(f"Details about the {part}")
|
| 188 |
|
| 189 |
|
| 190 |
+
# Homunculus parts 2 with emojis and corresponding healthcare prompts
|
| 191 |
+
homunculus_parts2 = {
|
| 192 |
+
"Head (H)": "π§ ", "Left Eye (LE)": "ποΈ", "Right Eye (RE)": "ποΈ",
|
| 193 |
+
"Left Eyebrow (LB)": "π€¨", "Right Eyebrow (RB)": "π€¨", "Nose (N)": "π",
|
| 194 |
+
"Mouth (M)": "π", "Neck (Ne)": "π§£", "Left Shoulder (LS)": "πͺ",
|
| 195 |
+
"Right Shoulder (RS)": "πͺ", "Left Upper Arm (LUA)": "πͺ",
|
| 196 |
+
"Right Upper Arm (RUA)": "πͺ", "Left Elbow (LEl)": "πͺ", "Right Elbow (REl)": "πͺ",
|
| 197 |
+
"Left Forearm (LF)": "πͺ", "Right Forearm (RF)": "πͺ", "Left Wrist (LW)": "ποΈ",
|
| 198 |
+
"Right Wrist (RW)": "ποΈ", "Left Hand (LH)": "π€", "Right Hand (RH)": "π€",
|
| 199 |
+
"Chest (C)": "π«", "Abdomen (Ab)": "π§", "Pelvis (P)": "π§",
|
| 200 |
+
"Left Hip (LHip)": "π¦΅", "Right Hip (RHip)": "π¦΅", "Left Thigh (LT)": "π¦΅",
|
| 201 |
+
"Right Thigh (RT)": "π¦΅", "Left Knee (LK)": "π¦΅", "Right Knee (RK)": "π¦΅",
|
| 202 |
+
"Left Shin (LSh)": "π¦΅", "Right Shin (RSh)": "π¦΅"
|
| 203 |
+
}
|
| 204 |
+
|
| 205 |
+
def display_homunculus_parts2():
|
| 206 |
+
st.title("Homunculus Model")
|
| 207 |
+
|
| 208 |
+
# Display container parts with sub-parts
|
| 209 |
+
container_parts = ["Head (H)", "Chest (C)", "Abdomen (Ab)", "Pelvis (P)"]
|
| 210 |
+
for part in container_parts:
|
| 211 |
+
with st.expander(f"{homunculus_parts2[part]} {part}", expanded=False):
|
| 212 |
+
col1, col2 = st.columns(2)
|
| 213 |
+
for subpart in homunculus_parts.keys():
|
| 214 |
+
if subpart.startswith(part.split(" ")[0]):
|
| 215 |
+
col = col1 if "Left" in subpart or part in container_parts else col2
|
| 216 |
+
col.write(f"{homunculus_parts2[subpart]} {subpart}")
|
| 217 |
+
|
| 218 |
+
# Display other parts
|
| 219 |
+
col1, col2 = st.columns(2)
|
| 220 |
+
for part in homunculus_parts2:
|
| 221 |
+
if part not in container_parts:
|
| 222 |
+
col = col1 if "Left" in part else col2
|
| 223 |
+
col.button(f"{homunculus_parts2[part]} {part}", key=part)
|
| 224 |
+
|
| 225 |
|
| 226 |
|
| 227 |
# Define function to add paper buttons and links
|
| 228 |
def add_paper_buttons_and_links():
|
| 229 |
|
| 230 |
+
# Homunculus
|
| 231 |
+
page = st.sidebar.radio("Choose a page:", ["Detailed Homunculus Model", "Homunculus Emoji Representation"])
|
| 232 |
+
if page == "Detailed Homunculus Model":
|
| 233 |
display_homunculus_parts()
|
| 234 |
+
elif page == "Homunculus Emoji Representation":
|
| 235 |
+
display_homunculus_parts2()
|
| 236 |
|
|
|
|
| 237 |
col1, col2, col3, col4 = st.columns(4)
|
| 238 |
|
| 239 |
with col1:
|