awacke1 commited on
Commit
4ae81d1
Β·
1 Parent(s): 9dfacde

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -30
app.py CHANGED
@@ -187,43 +187,42 @@ def display_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_parts2.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
 
 
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