Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -918,20 +918,21 @@ with gr.Blocks(css=css) as interface:
|
|
| 918 |
)
|
| 919 |
html += "</tr></thead><tbody>"
|
| 920 |
|
| 921 |
-
# 🏗️ Convert Confidence Score to an integer value for sorting purposes
|
| 922 |
-
for idx, row in enumerate(data_dicts):
|
| 923 |
-
|
| 924 |
-
|
| 925 |
-
|
| 926 |
|
| 927 |
-
|
| 928 |
-
|
| 929 |
-
|
| 930 |
-
|
| 931 |
-
|
| 932 |
-
|
|
|
|
| 933 |
|
| 934 |
-
|
| 935 |
|
| 936 |
# 🧹 Sort rows by Confidence Score if needed
|
| 937 |
# if sort_by_score and data_dicts:
|
|
|
|
| 918 |
)
|
| 919 |
html += "</tr></thead><tbody>"
|
| 920 |
|
| 921 |
+
# # 🏗️ Convert Confidence Score to an integer value for sorting purposes
|
| 922 |
+
# for idx, row in enumerate(data_dicts):
|
| 923 |
+
# # Parse the confidence score (f"{tier} ({score})\n{explanations_score}")
|
| 924 |
+
# conf_score_str = row.get("Confidence Score", "")
|
| 925 |
+
# score_value = None
|
| 926 |
|
| 927 |
+
# # Try to extract the score value (assuming it's in parentheses)
|
| 928 |
+
# if conf_score_str:
|
| 929 |
+
# try:
|
| 930 |
+
# score_value = float(conf_score_str.split('(')[1].split(')')[0].strip())
|
| 931 |
+
# score_value = conf_score_str
|
| 932 |
+
# except:
|
| 933 |
+
# score_value = None
|
| 934 |
|
| 935 |
+
# row['Confidence Score'] = score_value # Add as a new key for sorting purposes
|
| 936 |
|
| 937 |
# 🧹 Sort rows by Confidence Score if needed
|
| 938 |
# if sort_by_score and data_dicts:
|