Valeriy Sinyukov
commited on
Commit
·
ce32a21
1
Parent(s):
c710b24
Group same categories into one
Browse files- app.py +0 -1
- results.py +2 -1
app.py
CHANGED
@@ -21,7 +21,6 @@ def load_class_model(name):
|
|
21 |
model = class_models.get_model(name)
|
22 |
return model
|
23 |
|
24 |
-
|
25 |
lang = st.pills(label=langs_str, options=langs, default=en)
|
26 |
st.title(page_title[lang])
|
27 |
model_name = st.selectbox(
|
|
|
21 |
model = class_models.get_model(name)
|
22 |
return model
|
23 |
|
|
|
24 |
lang = st.pills(label=langs_str, options=langs, default=en)
|
25 |
st.title(page_title[lang])
|
26 |
model_name = st.selectbox(
|
results.py
CHANGED
@@ -119,9 +119,10 @@ def process_certainities(results):
|
|
119 |
|
120 |
def process_results(results, lang):
|
121 |
results = pd.DataFrame(results)
|
|
|
|
|
122 |
results = results.sort_values(by=[certainty_init],ascending=False)
|
123 |
results = filter_results(results)
|
124 |
-
results = process_categories(results, lang)
|
125 |
results = process_certainities(results)
|
126 |
results = process_keys(results, lang)
|
127 |
return results
|
|
|
119 |
|
120 |
def process_results(results, lang):
|
121 |
results = pd.DataFrame(results)
|
122 |
+
results = process_categories(results, lang)
|
123 |
+
results = results.groupby(by=category_init, as_index=False).sum()
|
124 |
results = results.sort_values(by=[certainty_init],ascending=False)
|
125 |
results = filter_results(results)
|
|
|
126 |
results = process_certainities(results)
|
127 |
results = process_keys(results, lang)
|
128 |
return results
|