Spaces:
Running
Running
XQ commited on
Commit ·
3a623df
1
Parent(s): cecafc1
Update UI
Browse files- src/ui/app.py +23 -5
src/ui/app.py
CHANGED
|
@@ -75,14 +75,15 @@ TEXTS: dict[str, dict[str, str]] = {
|
|
| 75 |
"hybrid søgning med reranking "
|
| 76 |
"og LLM-genererede svar med kildehenvisninger. LLM-laget er provider-agnostisk. "
|
| 77 |
"To tilstande: en LangGraph Plan-and-Execute-agent (standard) med samtalehukommelse til komplekse forespørgsler, "
|
| 78 |
-
"og en foruddefineret pipeline til lette modeller. Søgekvaliteten evalueres med RAGAS."
|
|
|
|
| 79 |
),
|
| 80 |
"search_label": "Stil et spørgsmål om ... ",
|
| 81 |
"search_placeholder": "F.eks.: Hvad er reglerne for behandling af personoplysninger?",
|
| 82 |
"search_button": "Søg",
|
| 83 |
"example_button": "Tilfældigt eksempel",
|
| 84 |
"spinner": "Søger i dokumenterne ...",
|
| 85 |
-
"status_label": "Tænker",
|
| 86 |
"status_done": "Færdig",
|
| 87 |
"status_error": "Noget gik galt",
|
| 88 |
"confidence_label": "Konfidensgrad",
|
|
@@ -158,14 +159,15 @@ TEXTS: dict[str, dict[str, str]] = {
|
|
| 158 |
"and LLM-generated answers with source citations. The LLM layer is provider-agnostic. "
|
| 159 |
"Two modes: a LangGraph Plan-and-Execute agent (default) with conversation memory for complex multi-step queries, "
|
| 160 |
"and a predefined pipeline for lightweight models. "
|
| 161 |
-
"Retrieval quality is evaluated with RAGAS."
|
|
|
|
| 162 |
),
|
| 163 |
"search_label": "Ask a question ...",
|
| 164 |
"search_placeholder": "E.g.: What are the rules for processing personal data?",
|
| 165 |
"search_button": "Search",
|
| 166 |
"example_button": "Random question",
|
| 167 |
"spinner": "Searching documents ...",
|
| 168 |
-
"status_label": "Thinking",
|
| 169 |
"status_done": "Done",
|
| 170 |
"status_error": "Something went wrong",
|
| 171 |
"confidence_label": "Confidence",
|
|
@@ -277,6 +279,13 @@ st.markdown(
|
|
| 277 |
margin: 0 0 2rem 0;
|
| 278 |
line-height: 1.6;
|
| 279 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 280 |
@media (max-width: 640px) {
|
| 281 |
.app-subtitle {
|
| 282 |
font-size: 0.82rem;
|
|
@@ -314,7 +323,16 @@ st.markdown(
|
|
| 314 |
|
| 315 |
/* ---------- Shrink main area top gap to align title with sidebar heading ---------- */
|
| 316 |
.block-container {
|
| 317 |
-
padding-top:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 318 |
}
|
| 319 |
section[data-testid="stSidebar"] .sidebar-heading {
|
| 320 |
font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
|
|
| 75 |
"hybrid søgning med reranking "
|
| 76 |
"og LLM-genererede svar med kildehenvisninger. LLM-laget er provider-agnostisk. "
|
| 77 |
"To tilstande: en LangGraph Plan-and-Execute-agent (standard) med samtalehukommelse til komplekse forespørgsler, "
|
| 78 |
+
"og en foruddefineret pipeline til lette modeller. Søgekvaliteten evalueres med RAGAS. "
|
| 79 |
+
'Vidensbasen indeholder <a href="https://github.com/Xiiqiing/Dokumentassistent/tree/main/docs" target="_blank">Københavns Universitets regler og retningslinjer</a>. Prøv at stille et spørgsmål om den.'
|
| 80 |
),
|
| 81 |
"search_label": "Stil et spørgsmål om ... ",
|
| 82 |
"search_placeholder": "F.eks.: Hvad er reglerne for behandling af personoplysninger?",
|
| 83 |
"search_button": "Søg",
|
| 84 |
"example_button": "Tilfældigt eksempel",
|
| 85 |
"spinner": "Søger i dokumenterne ...",
|
| 86 |
+
"status_label": "Tænker ...",
|
| 87 |
"status_done": "Færdig",
|
| 88 |
"status_error": "Noget gik galt",
|
| 89 |
"confidence_label": "Konfidensgrad",
|
|
|
|
| 159 |
"and LLM-generated answers with source citations. The LLM layer is provider-agnostic. "
|
| 160 |
"Two modes: a LangGraph Plan-and-Execute agent (default) with conversation memory for complex multi-step queries, "
|
| 161 |
"and a predefined pipeline for lightweight models. "
|
| 162 |
+
"Retrieval quality is evaluated with RAGAS. "
|
| 163 |
+
'The knowledge base contains <a href="https://github.com/Xiiqiing/Dokumentassistent/tree/main/docs" target="_blank">University of Copenhagen rules and regulations</a>. Try to ask a question about it.'
|
| 164 |
),
|
| 165 |
"search_label": "Ask a question ...",
|
| 166 |
"search_placeholder": "E.g.: What are the rules for processing personal data?",
|
| 167 |
"search_button": "Search",
|
| 168 |
"example_button": "Random question",
|
| 169 |
"spinner": "Searching documents ...",
|
| 170 |
+
"status_label": "Thinking ...",
|
| 171 |
"status_done": "Done",
|
| 172 |
"status_error": "Something went wrong",
|
| 173 |
"confidence_label": "Confidence",
|
|
|
|
| 279 |
margin: 0 0 2rem 0;
|
| 280 |
line-height: 1.6;
|
| 281 |
}
|
| 282 |
+
.app-subtitle a {
|
| 283 |
+
color: #901A1E;
|
| 284 |
+
text-decoration: underline;
|
| 285 |
+
}
|
| 286 |
+
.app-subtitle a:hover {
|
| 287 |
+
color: #6B1315;
|
| 288 |
+
}
|
| 289 |
@media (max-width: 640px) {
|
| 290 |
.app-subtitle {
|
| 291 |
font-size: 0.82rem;
|
|
|
|
| 323 |
|
| 324 |
/* ---------- Shrink main area top gap to align title with sidebar heading ---------- */
|
| 325 |
.block-container {
|
| 326 |
+
padding-top: 0.2rem !important;
|
| 327 |
+
}
|
| 328 |
+
/* Tighten language selector row so it doesn't push the title down */
|
| 329 |
+
div[data-testid="stHorizontalBlock"]:has(div[role="radiogroup"]) {
|
| 330 |
+
margin-top: 0 !important;
|
| 331 |
+
margin-bottom: 0 !important;
|
| 332 |
+
}
|
| 333 |
+
div[role="radiogroup"] {
|
| 334 |
+
margin-top: 0 !important;
|
| 335 |
+
margin-bottom: 0 !important;
|
| 336 |
}
|
| 337 |
section[data-testid="stSidebar"] .sidebar-heading {
|
| 338 |
font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|