Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -187,43 +187,42 @@ def display_homunculus_parts():
|
|
| 187 |
st.write(f"Details about the {part}")
|
| 188 |
|
| 189 |
|
| 190 |
-
# Homunculus parts
|
| 191 |
homunculus_parts2 = {
|
| 192 |
-
"Head (H)": "🧠", "Left Eye (LE)"
|
| 193 |
-
"
|
| 194 |
-
"
|
| 195 |
-
"
|
| 196 |
-
"
|
| 197 |
-
"Left Forearm (LF)"
|
| 198 |
-
"
|
| 199 |
-
"
|
| 200 |
-
"
|
| 201 |
-
"
|
| 202 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 203 |
}
|
| 204 |
|
| 205 |
def display_homunculus_parts2():
|
| 206 |
st.title("Homunculus Model")
|
| 207 |
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 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 |
|
|
|
|
| 187 |
st.write(f"Details about the {part}")
|
| 188 |
|
| 189 |
|
| 190 |
+
# Homunculus parts with emojis
|
| 191 |
homunculus_parts2 = {
|
| 192 |
+
"Head (H)": ["🧠", ["Left Eye (LE)", "Right Eye (RE)", "Left Eyebrow (LB)", "Right Eyebrow (RB)", "Nose (N)", "Mouth (M)"]],
|
| 193 |
+
"Neck (Ne)": "🧣",
|
| 194 |
+
"Shoulders": [["Left Shoulder (LS)", "Right Shoulder (RS)"], "💪"],
|
| 195 |
+
"Upper Arms": [["Left Upper Arm (LUA)", "Right Upper Arm (RUA)"], "💪"],
|
| 196 |
+
"Elbows": [["Left Elbow (LEl)", "Right Elbow (REl)"], "💪"],
|
| 197 |
+
"Forearms": [["Left Forearm (LF)", "Right Forearm (RF)"], "💪"],
|
| 198 |
+
"Wrists": [["Left Wrist (LW)", "Right Wrist (RW)"], "🖐️"],
|
| 199 |
+
"Hands": [["Left Hand (LH)", "Right Hand (RH)"], "🤚"],
|
| 200 |
+
"Chest (C)": "🫁",
|
| 201 |
+
"Abdomen (Ab)": "🧘",
|
| 202 |
+
"Pelvis (P)": "🧍",
|
| 203 |
+
"Hips": [["Left Hip (LHip)", "Right Hip (RHip)"], "🦵"],
|
| 204 |
+
"Thighs": [["Left Thigh (LT)", "Right Thigh (RT)"], "🦵"],
|
| 205 |
+
"Knees": [["Left Knee (LK)", "Right Knee (RK)"], "🦵"],
|
| 206 |
+
"Shins": [["Left Shin (LSh)", "Right Shin (RSh)"], "🦵"]
|
| 207 |
}
|
| 208 |
|
| 209 |
def display_homunculus_parts2():
|
| 210 |
st.title("Homunculus Model")
|
| 211 |
|
| 212 |
+
for part, content in homunculus_parts2.items():
|
| 213 |
+
if isinstance(content, list):
|
| 214 |
+
emoji, sub_parts = content[0], content[1]
|
| 215 |
+
with st.expander(f"{emoji} {part}", expanded=False):
|
| 216 |
+
if isinstance(sub_parts, list):
|
| 217 |
+
col1, col2 = st.columns(2)
|
| 218 |
+
for subpart in sub_parts:
|
| 219 |
+
col = col1 if "Left" in subpart else col2
|
| 220 |
+
col.write(f"{homunculus_parts2.get(subpart, '❓')} {subpart}")
|
| 221 |
+
else:
|
| 222 |
+
st.write(f"{emoji} {sub_parts}")
|
| 223 |
+
else:
|
| 224 |
+
st.write(f"{content} {part}")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 225 |
|
|
|
|
| 226 |
# Define function to add paper buttons and links
|
| 227 |
def add_paper_buttons_and_links():
|
| 228 |
|