Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -141,8 +141,61 @@ 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 |
# Define function to add paper buttons and links
|
| 145 |
def add_paper_buttons_and_links():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 146 |
col1, col2, col3, col4 = st.columns(4)
|
| 147 |
|
| 148 |
with col1:
|
|
|
|
| 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 = {
|
| 148 |
+
"Head": "π§ ", "Left Eye": "ποΈ", "Right Eye": "ποΈ",
|
| 149 |
+
"Left Eyebrow": "π€¨", "Right Eyebrow": "π€¨", "Nose": "π",
|
| 150 |
+
"Mouth": "π", "Neck": "π§£", "Left Shoulder": "πͺ",
|
| 151 |
+
"Right Shoulder": "πͺ", "Left Upper Arm": "πͺ",
|
| 152 |
+
"Right Upper Arm": "πͺ", "Left Elbow": "πͺ",
|
| 153 |
+
"Right Elbow": "πͺ", "Left Forearm": "πͺ",
|
| 154 |
+
"Right Forearm": "πͺ", "Left Wrist": "β",
|
| 155 |
+
"Right Wrist": "β", "Left Hand": "π€²",
|
| 156 |
+
"Right Hand": "π€²", "Chest": "π",
|
| 157 |
+
"Abdomen": "π", "Pelvis": "π©²",
|
| 158 |
+
"Left Hip": "π¦΅", "Right Hip": "π¦΅",
|
| 159 |
+
"Left Thigh": "π¦΅", "Right Thigh": "π¦΅",
|
| 160 |
+
"Left Knee": "π¦΅", "Right Knee": "π¦΅",
|
| 161 |
+
"Left Shin": "π¦΅", "Right Shin": "π¦΅"
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
# Function to display the homunculus parts with expanders
|
| 165 |
+
def display_homunculus_parts():
|
| 166 |
+
st.title("Homunculus Model")
|
| 167 |
+
|
| 168 |
+
# Container parts
|
| 169 |
+
with st.expander("Head (π§ )", expanded=False):
|
| 170 |
+
st.write("Contains: Left Eye ποΈ, Right Eye ποΈ, Left Eyebrow π€¨, Right Eyebrow π€¨, Nose π, Mouth π")
|
| 171 |
+
|
| 172 |
+
# Symmetric body parts (Left & Right)
|
| 173 |
+
for part in ["Shoulder", "Upper Arm", "Elbow", "Forearm", "Wrist", "Hand", "Hip", "Thigh", "Knee", "Shin"]:
|
| 174 |
+
col1, col2 = st.columns(2)
|
| 175 |
+
with col1:
|
| 176 |
+
with st.expander(f"Left {part} (πͺ)", expanded=False):
|
| 177 |
+
st.write(f"Details about the Left {part}")
|
| 178 |
+
with col2:
|
| 179 |
+
with st.expander(f"Right {part} (πͺ)", expanded=False):
|
| 180 |
+
st.write(f"Details about the Right {part}")
|
| 181 |
+
|
| 182 |
+
# Central body parts
|
| 183 |
+
for part in ["Neck", "Chest", "Abdomen", "Pelvis"]:
|
| 184 |
+
with st.expander(f"{part} ({homunculus_parts[part]})", expanded=False):
|
| 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:
|