Update pages/type_text_v10.py
Browse files- pages/type_text_v10.py +10 -11
pages/type_text_v10.py
CHANGED
@@ -59,8 +59,17 @@ if len(combined_chapters_rows_indexes_list) == 0:
|
|
59 |
st.warning("Please select at least one chapter")
|
60 |
st.write("COMBINED CHAPTERS ROWS INDEXES LIST: ", combined_chapters_rows_indexes_list)
|
61 |
df_SBS = pd.read_csv("SBS_V2_0/Code_Table.csv", header=0, skip_blank_lines=False, skiprows = lambda x: x not in combined_chapters_rows_indexes_list)
|
62 |
-
st.write(df_SBS.head(5))
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
|
66 |
|
@@ -109,16 +118,6 @@ INTdesc_embedding = model.encode(INTdesc_input)
|
|
109 |
|
110 |
# Semantic search, Compute cosine similarity between all pairs of SBS descriptions
|
111 |
|
112 |
-
#df_SBS = pd.read_csv("SBS_V2_Table.csv", index_col="SBS_Code", usecols=["Long_Description"]) # na_values=['NA']
|
113 |
-
#df_SBS = pd.read_csv("SBS_V2_Table.csv", usecols=["SBS_Code_Hyphenated","Long_Description"])
|
114 |
-
#from_line = 850 # Imaging services chapter start, adjust as needed
|
115 |
-
#to_line = 1250 # Imaging services chapter end, adjust as needed
|
116 |
-
#nrows = to_line - from_line + 1
|
117 |
-
#skiprows = list(range(1,from_line - 1))
|
118 |
-
#df_SBS = pd.read_csv("SBS_V2_0/Code_Table.csv", header=0, skip_blank_lines=False, skiprows=skiprows, nrows=nrows)
|
119 |
-
#st.write(df_SBS.head(5))
|
120 |
-
|
121 |
-
SBScorpus = df_SBS['Long_Description'].values.tolist()
|
122 |
SBScorpus_embeddings = model.encode(SBScorpus)
|
123 |
|
124 |
#my_model_results = pipeline("ner", model= "checkpoint-92")
|
|
|
59 |
st.warning("Please select at least one chapter")
|
60 |
st.write("COMBINED CHAPTERS ROWS INDEXES LIST: ", combined_chapters_rows_indexes_list)
|
61 |
df_SBS = pd.read_csv("SBS_V2_0/Code_Table.csv", header=0, skip_blank_lines=False, skiprows = lambda x: x not in combined_chapters_rows_indexes_list)
|
|
|
62 |
|
63 |
+
#df_SBS = pd.read_csv("SBS_V2_0/Code_Table.csv", index_col="SBS_Code", usecols=["Long_Description"]) # na_values=['NA']
|
64 |
+
#df_SBS = pd.read_csv("SBS_V2_0/Code_Table.csv", usecols=["SBS_Code_Hyphenated","Long_Description"])
|
65 |
+
#from_line = 850 # Imaging services chapter start, adjust as needed
|
66 |
+
#to_line = 1250 # Imaging services chapter end, adjust as needed
|
67 |
+
#nrows = to_line - from_line + 1
|
68 |
+
#skiprows = list(range(1,from_line - 1))
|
69 |
+
#df_SBS = pd.read_csv("SBS_V2_0/Code_Table.csv", header=0, skip_blank_lines=False, skiprows=skiprows, nrows=nrows)
|
70 |
+
|
71 |
+
st.write(df_SBS.head(5))
|
72 |
+
SBScorpus = df_SBS['Long_Description'].values.tolist()
|
73 |
|
74 |
|
75 |
|
|
|
118 |
|
119 |
# Semantic search, Compute cosine similarity between all pairs of SBS descriptions
|
120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
SBScorpus_embeddings = model.encode(SBScorpus)
|
122 |
|
123 |
#my_model_results = pipeline("ner", model= "checkpoint-92")
|