Add ROBERTA classifier ranking PoC, with 77pc off the bat

This commit is contained in:
William Jeynes
2026-03-13 11:24:51 +00:00
parent f09e36e740
commit 8311556855
8 changed files with 85 additions and 32 deletions
+8 -3
View File
@@ -56,7 +56,7 @@ def render():
st.error("Invalid folder path.")
return
jsonl_files = list(path.glob("*.jsonl"))
jsonl_files = sorted(path.glob("*.jsonl"))
if not jsonl_files:
st.info("No .jsonl files found in this folder.")
return
@@ -80,13 +80,13 @@ def render():
print(extra_lower)
if score is not None:
if score > THRESH and extra_lower == "perfect":
confidence_counter["Correct"] += 1
confidence_counter["Correct-TRUE"] += 1
elif score > THRESH and extra_lower != "perfect":
confidence_counter["Over-confident"] += 1
elif score < THRESH and extra_lower == "perfect":
confidence_counter["Under-confident"] += 1
else:
confidence_counter["Other"] += 1
confidence_counter["Correct-FALSE"] += 1
if confidence_counter:
df_conf = pd.DataFrame(
@@ -104,6 +104,11 @@ def render():
ax.axis("equal")
ax.set_title(file_path.name)
total = sum(confidence_counter.values())
correct = confidence_counter["Correct-TRUE"] + confidence_counter["Correct-FALSE"]
corr_percent = (correct / total) * 100
st.markdown(f"**Correct: {corr_percent:.2f}% ({correct}/{total})**")
st.pyplot(fig, width=500)
else:
st.info("No score data available in this file.")