Jack Monas commited on
Commit
811399c
·
1 Parent(s): f3b18f0
Files changed (1) hide show
  1. app.py +52 -31
app.py CHANGED
@@ -5,6 +5,56 @@ import glob
5
  import os
6
  import random
7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
 
9
  def resources_section():
10
  st.markdown("## Additional Resources")
@@ -94,37 +144,8 @@ def scoring_section():
94
  # Points Breakdown in a table
95
  st.markdown("### Points Breakdown")
96
  # Create three columns for a more interesting layout
97
- col1, col2, col3 = st.columns(3)
98
-
99
- with col1:
100
- st.markdown('<h3 style="margin-left:15px;">Compression</h3>', unsafe_allow_html=True)
101
- st.markdown(
102
- """
103
- - **1st Place**: 10 points
104
- - **2nd Place**: 7 points
105
- - **3rd Place**: 5 points
106
- """
107
- )
108
-
109
- with col2:
110
- st.markdown('<h3 style="margin-left:15px;">Sampling</h3>', unsafe_allow_html=True)
111
- st.markdown(
112
- """
113
- - **1st Place**: 10 points
114
- - **2nd Place**: 7 points
115
- - **3rd Place**: 5 points
116
- """
117
- )
118
-
119
- with col3:
120
- st.markdown('<h3 style="margin-left:15px;">Evaluation</h3>', unsafe_allow_html=True)
121
- st.markdown(
122
- """
123
- - **1st Place**: 20 points
124
- - **2nd Place**: 14 points
125
- - **3rd Place**: 10 points
126
- """
127
- )
128
  # Tie-Breakers in an expander for a cleaner layout
129
  with st.expander("Tie-Breakers"):
130
  st.write(
 
5
  import os
6
  import random
7
 
8
+ def display_challenge_card(challenge, points_html):
9
+ st.markdown(
10
+ f"""
11
+ <div style="
12
+ padding: 12px;
13
+ background-color: #1f1f1f;
14
+ border: 1px solid #333333;
15
+ border-radius: 8px;
16
+ margin-bottom: 12px;">
17
+ <h3 style="margin-left:15px; color: #ffffff;">{challenge}</h3>
18
+ <ul style="margin-left:20px; color: #cccccc; list-style-type: disc;">
19
+ {points_html}
20
+ </ul>
21
+ </div>
22
+ """,
23
+ unsafe_allow_html=True
24
+ )
25
+
26
+ # Within your scoring_section() function, replace the column blocks with:
27
+ col1, col2, col3 = st.columns(3)
28
+
29
+ with col1:
30
+ display_challenge_card(
31
+ "Compression",
32
+ """
33
+ <li><strong>1st Place:</strong> 10 points</li>
34
+ <li><strong>2nd Place:</strong> 7 points</li>
35
+ <li><strong>3rd Place:</strong> 5 points</li>
36
+ """
37
+ )
38
+
39
+ with col2:
40
+ display_challenge_card(
41
+ "Sampling",
42
+ """
43
+ <li><strong>1st Place:</strong> 10 points</li>
44
+ <li><strong>2nd Place:</strong> 7 points</li>
45
+ <li><strong>3rd Place:</strong> 5 points</li>
46
+ """
47
+ )
48
+
49
+ with col3:
50
+ display_challenge_card(
51
+ "Evaluation",
52
+ """
53
+ <li><strong>1st Place:</strong> 20 points</li>
54
+ <li><strong>2nd Place:</strong> 14 points</li>
55
+ <li><strong>3rd Place:</strong> 10 points</li>
56
+ """
57
+ )
58
 
59
  def resources_section():
60
  st.markdown("## Additional Resources")
 
144
  # Points Breakdown in a table
145
  st.markdown("### Points Breakdown")
146
  # Create three columns for a more interesting layout
147
+ display_challenge_card()
148
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
  # Tie-Breakers in an expander for a cleaner layout
150
  with st.expander("Tie-Breakers"):
151
  st.write(