Update pages/type_text.py
Browse files- pages/type_text.py +1 -3
pages/type_text.py
CHANGED
@@ -176,9 +176,7 @@ if INTdesc_input is not None and st.button("Map to SBS codes"):
|
|
176 |
HF_model_results_sorted = sorted(HF_model_results, key=lambda x: x[1], reverse=True)
|
177 |
HF_model_results_displayed = HF_model_results_sorted[0:numMAPPINGS_input]
|
178 |
|
179 |
-
|
180 |
-
#if INTdesc_input is not None and mapSBS_button == True:
|
181 |
-
if INTdesc_input is not None and st.button("Map to SBS codes"):
|
182 |
for i, result in enumerate(HF_model_results_displayed):
|
183 |
dictA.update({"Score": "%.4f" % result[0]["score"], "SBS Code": df_SBS.loc[df_SBS["Long_Description"] == SBScorpus[result[0]["corpus_id"]],"SBS_Code_Hyphenated"].values[0], "SBS Description V2.0": SBScorpus[result[0]["corpus_id"]]})
|
184 |
dfALL = pd.concat([dfALL, pd.DataFrame([dictA])], ignore_index=True)
|
|
|
176 |
HF_model_results_sorted = sorted(HF_model_results, key=lambda x: x[1], reverse=True)
|
177 |
HF_model_results_displayed = HF_model_results_sorted[0:numMAPPINGS_input]
|
178 |
|
179 |
+
#if INTdesc_input is not None and mapSBS_button == True: # earlier button version
|
|
|
|
|
180 |
for i, result in enumerate(HF_model_results_displayed):
|
181 |
dictA.update({"Score": "%.4f" % result[0]["score"], "SBS Code": df_SBS.loc[df_SBS["Long_Description"] == SBScorpus[result[0]["corpus_id"]],"SBS_Code_Hyphenated"].values[0], "SBS Description V2.0": SBScorpus[result[0]["corpus_id"]]})
|
182 |
dfALL = pd.concat([dfALL, pd.DataFrame([dictA])], ignore_index=True)
|