NathanRoll commited on
Commit
86148f3
·
verified ·
1 Parent(s): c19efd2

Avoid family grid flash on direct family links

Browse files
Files changed (1) hide show
  1. app.py +14 -1
app.py CHANGED
@@ -1239,6 +1239,19 @@ def browse_html() -> str:
1239
  return directory_html()
1240
 
1241
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1242
  def browse_page_for_request(request: gr.Request):
1243
  try:
1244
  query = dict(request.query_params) if request else {}
@@ -1431,7 +1444,7 @@ THEME = gr.themes.Base()
1431
  with gr.Blocks(title="Packing Benchmark") as demo:
1432
  with gr.Tabs():
1433
  with gr.Tab("Families"):
1434
- browse_page = gr.HTML(directory_html())
1435
 
1436
  with gr.Tab("Family Records"):
1437
  choices = setup_choices()
 
1239
  return directory_html()
1240
 
1241
 
1242
+ def loading_html() -> str:
1243
+ return """
1244
+ <main class="packing-shell">
1245
+ <section class="hero-stage">
1246
+ <div class="contain">
1247
+ <h1>Packing Benchmark</h1>
1248
+ <p class="hero-copy">Loading records...</p>
1249
+ </div>
1250
+ </section>
1251
+ </main>
1252
+ """
1253
+
1254
+
1255
  def browse_page_for_request(request: gr.Request):
1256
  try:
1257
  query = dict(request.query_params) if request else {}
 
1444
  with gr.Blocks(title="Packing Benchmark") as demo:
1445
  with gr.Tabs():
1446
  with gr.Tab("Families"):
1447
+ browse_page = gr.HTML(loading_html())
1448
 
1449
  with gr.Tab("Family Records"):
1450
  choices = setup_choices()