KJ commited on
Commit ·
166bf88
1
Parent(s): e3f741a
count per domain
Browse files
app.py
CHANGED
|
@@ -116,9 +116,13 @@ entity_lookup = {f"{ent} ({count})": ent for ent, count in entity_counts.items()
|
|
| 116 |
selected_labels = st.multiselect(T[LANG]["select_entities"], entity_labels)
|
| 117 |
entities = [entity_lookup[label] for label in selected_labels]
|
| 118 |
|
| 119 |
-
# --- Domain dropdown ---
|
| 120 |
domain_counts = df["domain"].value_counts()
|
| 121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 122 |
score_type = st.selectbox(T[LANG]["score_type"], ["entity_score", "title_score", "overall_score"])
|
| 123 |
group_by_domain = st.checkbox(T[LANG]["group_by_domain"])
|
| 124 |
group_by_score_type = st.checkbox(T[LANG]["all_scores"])
|
|
|
|
| 116 |
selected_labels = st.multiselect(T[LANG]["select_entities"], entity_labels)
|
| 117 |
entities = [entity_lookup[label] for label in selected_labels]
|
| 118 |
|
| 119 |
+
# --- Domain dropdown with counts ---
|
| 120 |
domain_counts = df["domain"].value_counts()
|
| 121 |
+
domain_labels = [f"{dom} ({count})" for dom, count in domain_counts.items()]
|
| 122 |
+
domain_lookup = {f"{dom} ({count})": dom for dom, count in domain_counts.items()}
|
| 123 |
+
selected_domain_labels = st.multiselect(T[LANG]["select_domains"], domain_labels)
|
| 124 |
+
domains = [domain_lookup[label] for label in selected_domain_labels]
|
| 125 |
+
|
| 126 |
score_type = st.selectbox(T[LANG]["score_type"], ["entity_score", "title_score", "overall_score"])
|
| 127 |
group_by_domain = st.checkbox(T[LANG]["group_by_domain"])
|
| 128 |
group_by_score_type = st.checkbox(T[LANG]["all_scores"])
|