Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -931,11 +931,11 @@ with gr.Blocks(css=css) as interface:
|
|
| 931 |
except:
|
| 932 |
score_value = None
|
| 933 |
|
| 934 |
-
row['Confidence Score
|
| 935 |
|
| 936 |
# 🧹 Sort rows by Confidence Score if needed
|
| 937 |
-
if sort_by_score and data_dicts:
|
| 938 |
-
|
| 939 |
|
| 940 |
# Fill rows
|
| 941 |
for idx, row in enumerate(data_dicts, 1):
|
|
|
|
| 931 |
except:
|
| 932 |
score_value = None
|
| 933 |
|
| 934 |
+
#row['Confidence Score'] = score_value # Add as a new key for sorting purposes
|
| 935 |
|
| 936 |
# 🧹 Sort rows by Confidence Score if needed
|
| 937 |
+
# if sort_by_score and data_dicts:
|
| 938 |
+
# data_dicts = sorted(data_dicts, key=lambda x: x.get('Confidence Score Value', 0), reverse=not ascending)
|
| 939 |
|
| 940 |
# Fill rows
|
| 941 |
for idx, row in enumerate(data_dicts, 1):
|