XQ commited on
Commit
f299e1f
·
1 Parent(s): 7fb62fa

Update UI and description

Browse files
Files changed (2) hide show
  1. README.md +1 -1
  2. src/ui/app.py +14 -6
README.md CHANGED
@@ -12,7 +12,7 @@ noindex: true
12
 
13
  **Live Demo:** [xq-dokumentassistent.hf.space](https://xq-dokumentassistent.hf.space) — hosted on Hugging Face Spaces
14
 
15
- A document intelligence system covering PDF ingestion, semantic chunking, hybrid retrieval with reranking, and LLM-generated answers with source citations. The LLM layer is provider-agnostic. Two modes: a fixed pipeline for lightweight models, a LangGraph ReAct agent for queries that need multiple retrieval steps. Retrieval quality is evaluated with RAGAS.
16
 
17
  ## How it works
18
 
 
12
 
13
  **Live Demo:** [xq-dokumentassistent.hf.space](https://xq-dokumentassistent.hf.space) — hosted on Hugging Face Spaces
14
 
15
+ A document intelligence system built on a RAG architecture, covering PDF ingestion, semantic chunking, hybrid retrieval with reranking, and LLM-generated answers with source citations. The LLM layer is provider-agnostic. Two modes: a fixed pipeline for lightweight models, a LangGraph ReAct agent for queries that need multiple retrieval steps. Retrieval quality is evaluated with RAGAS.
16
 
17
  ## How it works
18
 
src/ui/app.py CHANGED
@@ -61,7 +61,7 @@ TEXTS: dict[str, dict[str, str]] = {
61
  "title": "Dokumentassistent",
62
  "title_badge": "Demo",
63
  "subtitle": (
64
- "Et dokumentintelligens-system der dækker PDF-indlæsning, semantisk chunking, "
65
  "hybrid søgning med reranking "
66
  "og LLM-genererede svar med kildehenvisninger. LLM-laget er provider-agnostisk. "
67
  "To tilstande: en fast pipeline til lette modeller og en LangGraph ReAct-agent "
@@ -137,7 +137,7 @@ TEXTS: dict[str, dict[str, str]] = {
137
  "title": "Document Assistant",
138
  "title_badge": "Demo",
139
  "subtitle": (
140
- "A document intelligence system covering PDF ingestion, semantic chunking, "
141
  "hybrid retrieval with reranking, "
142
  "and LLM-generated answers with source citations. The LLM layer is provider-agnostic. "
143
  "Two modes: a fixed pipeline for lightweight models, a LangGraph ReAct agent "
@@ -251,6 +251,12 @@ st.markdown(
251
  margin: 0 0 2rem 0;
252
  line-height: 1.6;
253
  }
 
 
 
 
 
 
254
 
255
  /* ---------- Sidebar ---------- */
256
  section[data-testid="stSidebar"] {
@@ -460,10 +466,11 @@ st.markdown(
460
  f'</div>',
461
  unsafe_allow_html=True,
462
  )
463
- st.markdown(
464
- f'<div class="app-subtitle">{t["subtitle"]}</div>',
465
- unsafe_allow_html=True,
466
- )
 
467
 
468
  # ---------------------------------------------------------------------------
469
  # Search form
@@ -488,6 +495,7 @@ with st.form(key="search_form", clear_on_submit=False):
488
  # Query logic
489
  # ---------------------------------------------------------------------------
490
  if search_clicked and question.strip():
 
491
  data: dict = {}
492
  _sse_error: dict | None = None
493
 
 
61
  "title": "Dokumentassistent",
62
  "title_badge": "Demo",
63
  "subtitle": (
64
+ "Et dokumentintelligens-system bygget en RAG-arkitektur, dækkende PDF-indlæsning, semantisk chunking, "
65
  "hybrid søgning med reranking "
66
  "og LLM-genererede svar med kildehenvisninger. LLM-laget er provider-agnostisk. "
67
  "To tilstande: en fast pipeline til lette modeller og en LangGraph ReAct-agent "
 
137
  "title": "Document Assistant",
138
  "title_badge": "Demo",
139
  "subtitle": (
140
+ "A document intelligence system built on a RAG architecture, covering PDF ingestion, semantic chunking, "
141
  "hybrid retrieval with reranking, "
142
  "and LLM-generated answers with source citations. The LLM layer is provider-agnostic. "
143
  "Two modes: a fixed pipeline for lightweight models, a LangGraph ReAct agent "
 
251
  margin: 0 0 2rem 0;
252
  line-height: 1.6;
253
  }
254
+ @media (max-width: 640px) {
255
+ .app-subtitle {
256
+ font-size: 0.82rem;
257
+ line-height: 1.5;
258
+ }
259
+ }
260
 
261
  /* ---------- Sidebar ---------- */
262
  section[data-testid="stSidebar"] {
 
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
 
495
  # Query logic
496
  # ---------------------------------------------------------------------------
497
  if search_clicked and question.strip():
498
+ st.session_state["has_searched"] = True
499
  data: dict = {}
500
  _sse_error: dict | None = None
501