awacke1 commited on
Commit
e95063c
Β·
1 Parent(s): bb18704

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +43 -5
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
- import streamlit as st
 
 
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: