Commit
·
3b1b05f
1
Parent(s):
6c25308
a bit debug
Browse files- ocr_qa_assessment.py +2 -3
ocr_qa_assessment.py
CHANGED
@@ -19,9 +19,8 @@ class QAAssessmentPipeline(Pipeline):
|
|
19 |
|
20 |
def postprocess(self, outputs, **kwargs):
|
21 |
predictions = outputs
|
22 |
-
print(f"Predictions: {predictions}")
|
23 |
-
label = predictions[0][0].replace("__label__", "") # Remove __label__ prefix
|
24 |
|
25 |
# Format as JSON-compatible dictionary
|
26 |
# model_output = {"label": label, "score": round(score, 4)}
|
27 |
-
return {}
|
|
|
19 |
|
20 |
def postprocess(self, outputs, **kwargs):
|
21 |
predictions = outputs
|
22 |
+
# print(f"Predictions: {predictions}")
|
|
|
23 |
|
24 |
# Format as JSON-compatible dictionary
|
25 |
# model_output = {"label": label, "score": round(score, 4)}
|
26 |
+
return {"score": round(predictions[0], 4)}
|