Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -215,6 +215,40 @@ homunculus_parts = {
|
|
215 |
"Left Knee": "🦵", "Right Knee": "🦵",
|
216 |
"Left Shin": "🦵", "Right Shin": "🦵"
|
217 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
|
219 |
# Function to display the homunculus parts with expanders and chat buttons
|
220 |
def display_homunculus_parts():
|
@@ -252,21 +286,21 @@ def display_homunculus_parts():
|
|
252 |
for part in symmetric_parts:
|
253 |
col1, col2 = st.columns(2)
|
254 |
with col1:
|
255 |
-
with st.expander(f"Left {part} ({
|
256 |
-
prompt = f"Learn about the key features of Left {part}"
|
257 |
if st.button(f"Explore Left {part} 💪", key=f"Left {part}"):
|
258 |
response = chat_with_model(prompt, f"Left {part}")
|
259 |
with col2:
|
260 |
-
with st.expander(f"Right {part} ({
|
261 |
-
prompt = f"Learn about the key features of Right {part}"
|
262 |
if st.button(f"Explore Right {part} 💪", key=f"Right {part}"):
|
263 |
response = chat_with_model(prompt, f"Right {part}")
|
264 |
-
|
265 |
# Displaying central body parts
|
266 |
central_parts = ["Neck", "Chest", "Abdomen", "Pelvis"]
|
267 |
for part in central_parts:
|
268 |
-
with st.expander(f"{part} ({
|
269 |
-
prompt = f"Learn about the key features of {part}"
|
270 |
if st.button(f"Explore {part} 🧣", key=part):
|
271 |
response = chat_with_model(prompt, part)
|
272 |
|
|
|
215 |
"Left Knee": "🦵", "Right Knee": "🦵",
|
216 |
"Left Shin": "🦵", "Right Shin": "🦵"
|
217 |
}
|
218 |
+
homunculus_parts_extended = {
|
219 |
+
"Head": "🧠 (Center of Thought and Control)",
|
220 |
+
"Brain": "🧠 (Organ of Intelligence and Processing)",
|
221 |
+
"Left Eye": "👁️ (Vision and Perception - Left)",
|
222 |
+
"Right Eye": "👁️ (Vision and Perception - Right)",
|
223 |
+
"Left Eyebrow": "🤨 (Facial Expression - Left Eyebrow)",
|
224 |
+
"Right Eyebrow": "🤨 (Facial Expression - Right Eyebrow)",
|
225 |
+
"Nose": "👃 (Smell and Breathing)",
|
226 |
+
"Mouth": "👄 (Speech and Eating)",
|
227 |
+
"Neck": "🧣 (Support and Movement of Head)",
|
228 |
+
"Left Shoulder": "💪 (Arm Movement and Strength - Left)",
|
229 |
+
"Right Shoulder": "💪 (Arm Movement and Strength - Right)",
|
230 |
+
"Left Upper Arm": "💪 (Support and Lifting - Left Upper)",
|
231 |
+
"Right Upper Arm": "💪 (Support and Lifting - Right Upper)",
|
232 |
+
"Left Elbow": "💪 (Arm Bending and Flexing - Left)",
|
233 |
+
"Right Elbow": "💪 (Arm Bending and Flexing - Right)",
|
234 |
+
"Left Forearm": "💪 (Wrist and Hand Movement - Left)",
|
235 |
+
"Right Forearm": "💪 (Wrist and Hand Movement - Right)",
|
236 |
+
"Left Wrist": "✊ (Hand Articulation and Rotation - Left)",
|
237 |
+
"Right Wrist": "✊ (Hand Articulation and Rotation - Right)",
|
238 |
+
"Left Hand": "🤲 (Grasping and Touch - Left)",
|
239 |
+
"Right Hand": "🤲 (Grasping and Touch - Right)",
|
240 |
+
"Chest": "👕 (Protection of Heart and Lungs)",
|
241 |
+
"Abdomen": "👕 (Digestive Organs and Processing)",
|
242 |
+
"Pelvis": "🩲 (Support for Lower Limbs and Organs)",
|
243 |
+
"Left Hip": "🦵 (Support and Movement - Left Hip)",
|
244 |
+
"Right Hip": "🦵 (Support and Movement - Right Hip)",
|
245 |
+
"Left Thigh": "🦵 (Support and Movement - Left Thigh)",
|
246 |
+
"Right Thigh": "🦵 (Support and Movement - Right Thigh)",
|
247 |
+
"Left Knee": "🦵 (Leg Bending and Flexing - Left)",
|
248 |
+
"Right Knee": "🦵 (Leg Bending and Flexing - Right)",
|
249 |
+
"Left Shin": "🦵 (Lower Leg Support - Left)",
|
250 |
+
"Right Shin": "🦵 (Lower Leg Support - Right)"
|
251 |
+
}
|
252 |
|
253 |
# Function to display the homunculus parts with expanders and chat buttons
|
254 |
def display_homunculus_parts():
|
|
|
286 |
for part in symmetric_parts:
|
287 |
col1, col2 = st.columns(2)
|
288 |
with col1:
|
289 |
+
with st.expander(f"Left {part} ({homunculus_parts_extended[f'Left {part}']})", expanded=False):
|
290 |
+
prompt = f"Learn about the key features and functions of the Left {part} - {homunculus_parts_extended[f'Left {part}'].split(' ')[-1]}"
|
291 |
if st.button(f"Explore Left {part} 💪", key=f"Left {part}"):
|
292 |
response = chat_with_model(prompt, f"Left {part}")
|
293 |
with col2:
|
294 |
+
with st.expander(f"Right {part} ({homunculus_parts_extended[f'Right {part}']})", expanded=False):
|
295 |
+
prompt = f"Learn about the key features and functions of the Right {part} - {homunculus_parts_extended[f'Right {part}'].split(' ')[-1]}"
|
296 |
if st.button(f"Explore Right {part} 💪", key=f"Right {part}"):
|
297 |
response = chat_with_model(prompt, f"Right {part}")
|
298 |
+
|
299 |
# Displaying central body parts
|
300 |
central_parts = ["Neck", "Chest", "Abdomen", "Pelvis"]
|
301 |
for part in central_parts:
|
302 |
+
with st.expander(f"{part} ({homunculus_parts_extended[part]})", expanded=False):
|
303 |
+
prompt = f"Learn about the key features and functions of the {part} - {homunculus_parts_extended[part].split(' ')[-1]}"
|
304 |
if st.button(f"Explore {part} 🧣", key=part):
|
305 |
response = chat_with_model(prompt, part)
|
306 |
|