Rathapoom commited on
Commit
a2224e2
1 Parent(s): 84aa789

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -8
app.py CHANGED
@@ -10,18 +10,17 @@ st.image("1.jpg", caption="Initial Presentation", use_container_width=True)
10
  st.subheader("Scene 1: Patient Arrives at ER")
11
  choice_1 = st.radio(
12
  "What will you do first?",
13
- ["Examine the leg", "Send for X-ray", "Administer strong analgesics"],
14
- index=-1 # No default selection
15
  )
16
 
 
17
  if choice_1 == "Examine the leg":
18
  st.image("2.jpg", caption="Examination Findings", use_container_width=True)
19
  st.write("Findings: Swollen, tense leg with pain on passive stretching and decreased sensation.")
20
  st.subheader("What is your next step?")
21
  choice_2 = st.radio(
22
  "Choose an action:",
23
- ["Measure compartment pressure", "Monitor and wait", "Repeat physical exam after medication"],
24
- index=-1 # No default selection
25
  )
26
  if choice_2 == "Measure compartment pressure":
27
  st.image("3.jpg", caption="Pressure Measurement", use_container_width=True)
@@ -48,7 +47,5 @@ elif choice_1 == "Administer strong analgesics":
48
  st.image("8.jpg", caption="Administering Pain Relief", use_container_width=True)
49
  st.warning("Pain worsens despite medication. Signs of compartment syndrome persist.")
50
  st.write("**Action:** Reassess and proceed to examination or measure compartment pressure.")
51
-
52
- # End of the game
53
- st.subheader("Game Over")
54
- st.write("Reflect on your decisions and discuss what could be done differently in a real scenario.")
 
10
  st.subheader("Scene 1: Patient Arrives at ER")
11
  choice_1 = st.radio(
12
  "What will you do first?",
13
+ ["Select an option", "Examine the leg", "Send for X-ray", "Administer strong analgesics"]
 
14
  )
15
 
16
+ # Proceed only if a valid option is selected
17
  if choice_1 == "Examine the leg":
18
  st.image("2.jpg", caption="Examination Findings", use_container_width=True)
19
  st.write("Findings: Swollen, tense leg with pain on passive stretching and decreased sensation.")
20
  st.subheader("What is your next step?")
21
  choice_2 = st.radio(
22
  "Choose an action:",
23
+ ["Select an option", "Measure compartment pressure", "Monitor and wait", "Repeat physical exam after medication"]
 
24
  )
25
  if choice_2 == "Measure compartment pressure":
26
  st.image("3.jpg", caption="Pressure Measurement", use_container_width=True)
 
47
  st.image("8.jpg", caption="Administering Pain Relief", use_container_width=True)
48
  st.warning("Pain worsens despite medication. Signs of compartment syndrome persist.")
49
  st.write("**Action:** Reassess and proceed to examination or measure compartment pressure.")
50
+ else:
51
+ st.write("Please select an option to proceed.")