emanuelaboros commited on
Commit
6c25308
·
1 Parent(s): 3eacf71

a bit debug

Browse files
Files changed (1) hide show
  1. modeling_ocrqa.py +8 -8
modeling_ocrqa.py CHANGED
@@ -125,14 +125,14 @@ class QAAssessmentModel(PreTrainedModel):
125
  logger.warning(f"Language '{lang}' not found in bin_filename, using 'other' as default.")
126
  lang = "other"
127
 
128
- # Process the text using the selected filter
129
- result = filter_text(text, self.ocrqa_assessors[lang])
130
- known_count = len(result["known"])
131
- unknown_count = len(result["unknown"])
132
-
133
- # Compute quality score percentage
134
- score = (known_count / (known_count + unknown_count + 0.000001)) # * 100
135
- predictions.append(score)
136
 
137
  return predictions
138
 
 
125
  logger.warning(f"Language '{lang}' not found in bin_filename, using 'other' as default.")
126
  lang = "other"
127
 
128
+ # Process the text using the selected filter
129
+ result = filter_text(text, self.ocrqa_assessors[lang])
130
+ known_count = len(result["known"])
131
+ unknown_count = len(result["unknown"])
132
+
133
+ # Compute quality score percentage
134
+ score = (known_count / (known_count + unknown_count + 0.000001)) # * 100
135
+ predictions.append(score)
136
 
137
  return predictions
138