XQ commited on
Commit
30aa195
·
1 Parent(s): f299e1f

Update UI

Browse files
Files changed (1) hide show
  1. src/ui/app.py +9 -5
src/ui/app.py CHANGED
@@ -466,11 +466,8 @@ st.markdown(
466
  f'</div>',
467
  unsafe_allow_html=True,
468
  )
469
- if not st.session_state.get("has_searched"):
470
- st.markdown(
471
- f'<div class="app-subtitle">{t["subtitle"]}</div>',
472
- unsafe_allow_html=True,
473
- )
474
 
475
  # ---------------------------------------------------------------------------
476
  # Search form
@@ -491,6 +488,13 @@ with st.form(key="search_form", clear_on_submit=False):
491
  with col_example:
492
  st.form_submit_button(t["example_button"], on_click=_pick_example, use_container_width=True)
493
 
 
 
 
 
 
 
 
494
  # ---------------------------------------------------------------------------
495
  # Query logic
496
  # ---------------------------------------------------------------------------
 
466
  f'</div>',
467
  unsafe_allow_html=True,
468
  )
469
+ # Subtitle placeholder — filled after we know whether search was clicked
470
+ _subtitle_slot = st.empty()
 
 
 
471
 
472
  # ---------------------------------------------------------------------------
473
  # Search form
 
488
  with col_example:
489
  st.form_submit_button(t["example_button"], on_click=_pick_example, use_container_width=True)
490
 
491
+ # Show subtitle only when no search is active
492
+ if not search_clicked and not st.session_state.get("has_searched"):
493
+ _subtitle_slot.markdown(
494
+ f'<div class="app-subtitle">{t["subtitle"]}</div>',
495
+ unsafe_allow_html=True,
496
+ )
497
+
498
  # ---------------------------------------------------------------------------
499
  # Query logic
500
  # ---------------------------------------------------------------------------