Update pages/type_text.py
Browse files- pages/type_text.py +3 -3
pages/type_text.py
CHANGED
@@ -9,7 +9,7 @@ from sentence_transformers import SentenceTransformer, util
|
|
9 |
import os
|
10 |
os.getenv("HF_TOKEN")
|
11 |
|
12 |
-
st.header("Map internal descriptions to SBS codes using Sentence Transformer
|
13 |
st.subheader("Select specific Chapter for quicker results")
|
14 |
#df_chapters = pd.read_csv("SBS_V2_0/Chapter_Index_Rows.csv")
|
15 |
df_chapters = pd.read_csv("SBS_V2_0/Chapter_Index_Rows_with_total.csv")
|
@@ -159,7 +159,7 @@ pipe = load_pipe()
|
|
159 |
|
160 |
|
161 |
#mapSBS_button = st.button("Map to SBS codes", on_click=on_click, key="user_clickedSBS")
|
162 |
-
mapSBS_button = st.button("Map to SBS codes") #, key="user_clickedSBS")
|
163 |
|
164 |
INTdesc_embedding = model.encode(INTdesc_input)
|
165 |
|
@@ -171,7 +171,7 @@ dictA = {"Score": [], "SBS Code": [], "SBS Description V2.0": []}
|
|
171 |
dfALL = pd.DataFrame.from_dict(dictA)
|
172 |
|
173 |
|
174 |
-
if INTdesc_input is not None and st.button("
|
175 |
#my_model_results = pipeline("ner", model= "checkpoint-92")
|
176 |
HF_model_results = util.semantic_search(INTdesc_embedding, SBScorpus_embeddings)
|
177 |
HF_model_results_sorted = sorted(HF_model_results, key=lambda x: x[1], reverse=True)
|
|
|
9 |
import os
|
10 |
os.getenv("HF_TOKEN")
|
11 |
|
12 |
+
st.header("Map internal descriptions to SBS codes using Sentence Transformer + Reasoning Models")
|
13 |
st.subheader("Select specific Chapter for quicker results")
|
14 |
#df_chapters = pd.read_csv("SBS_V2_0/Chapter_Index_Rows.csv")
|
15 |
df_chapters = pd.read_csv("SBS_V2_0/Chapter_Index_Rows_with_total.csv")
|
|
|
159 |
|
160 |
|
161 |
#mapSBS_button = st.button("Map to SBS codes", on_click=on_click, key="user_clickedSBS")
|
162 |
+
#mapSBS_button = st.button("Map to SBS codes") #, key="user_clickedSBS")
|
163 |
|
164 |
INTdesc_embedding = model.encode(INTdesc_input)
|
165 |
|
|
|
171 |
dfALL = pd.DataFrame.from_dict(dictA)
|
172 |
|
173 |
|
174 |
+
if INTdesc_input is not None and st.button("Map to SBS codes"):
|
175 |
#my_model_results = pipeline("ner", model= "checkpoint-92")
|
176 |
HF_model_results = util.semantic_search(INTdesc_embedding, SBScorpus_embeddings)
|
177 |
HF_model_results_sorted = sorted(HF_model_results, key=lambda x: x[1], reverse=True)
|