Wil2200 Claude Opus 4.6 commited on
Commit
a9253e5
ยท
1 Parent(s): 54dbea6

Redesign waiting room: Slowpoke illustration, queue info, timeout policy

Browse files
Files changed (1) hide show
  1. app/session_queue.py +27 -8
app/session_queue.py CHANGED
@@ -143,23 +143,42 @@ def queue_gate() -> bool:
143
  # Scrolling multilingual banner
144
  language_banner()
145
 
 
 
 
 
 
 
 
 
 
146
  st.markdown(
147
  "<div style='text-align:center; margin-top:20px;'>"
148
- f"<img src='{_SLOWBRO_IMG}' width='100' />"
149
  "</div>",
150
  unsafe_allow_html=True,
151
  )
152
  st.markdown(
153
- "<h3 style='text-align:center;'>Slowbro is a bit busy right now...</h3>",
 
 
 
154
  unsafe_allow_html=True,
155
  )
156
 
157
- n_active = active_count()
158
- st.markdown(
159
- f"<p style='text-align:center; color:gray;'>"
160
- f"{n_active}/{_MAX_CONCURRENT} seats occupied. "
161
- f"You are in the waiting room.</p>",
162
- unsafe_allow_html=True,
 
 
 
 
 
 
 
163
  )
164
 
165
  # โ”€โ”€ Rolling cultural facts โ”€โ”€
 
143
  # Scrolling multilingual banner
144
  language_banner()
145
 
146
+ _SLOWPOKE_IMG = (
147
+ "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites"
148
+ "/pokemon/other/official-artwork/79.png"
149
+ )
150
+
151
+ n_active = active_count()
152
+ spots_left = spots_available()
153
+
154
+ # โ”€โ”€ Slowpoke waiting illustration โ”€โ”€
155
  st.markdown(
156
  "<div style='text-align:center; margin-top:20px;'>"
157
+ f"<img src='{_SLOWPOKE_IMG}' width='120' />"
158
  "</div>",
159
  unsafe_allow_html=True,
160
  )
161
  st.markdown(
162
+ "<h3 style='text-align:center;'>Slowbro is busy crunching numbers...</h3>"
163
+ "<p style='text-align:center; color:gray;'>"
164
+ "All seats are taken! But don't worry โ€” Slowpoke is keeping "
165
+ "your spot warm. You'll get in as soon as someone finishes.</p>",
166
  unsafe_allow_html=True,
167
  )
168
 
169
+ # โ”€โ”€ Queue status โ”€โ”€
170
+ q1, q2 = st.columns(2)
171
+ with q1:
172
+ st.metric("Active users", f"{n_active} / {_MAX_CONCURRENT}")
173
+ with q2:
174
+ st.metric("Seats available", str(spots_left))
175
+
176
+ # โ”€โ”€ Session policy note โ”€โ”€
177
+ st.warning(
178
+ "**How the queue works:** Each user gets a seat for as long as "
179
+ "they're active. Sessions expire after **2 minutes** of inactivity "
180
+ "to keep things moving โ€” but if you're running a model, your seat "
181
+ "is safe until estimation completes."
182
  )
183
 
184
  # โ”€โ”€ Rolling cultural facts โ”€โ”€