Commit
·
6211123
1
Parent(s):
88c1917
a bit debug
Browse files- modeling_ocrqa.py +4 -3
modeling_ocrqa.py
CHANGED
@@ -89,10 +89,11 @@ class QAAssessmentModel(PreTrainedModel):
|
|
89 |
for lang in bin_filenames.keys():
|
90 |
model_filename = self.config.config.filename[lang]
|
91 |
print(f"Loading model for {lang}: {model_filename}")
|
92 |
-
if not os.path.exists(model_filename):
|
93 |
# print(f"{bin_filename} not found locally, downloading from Hugging Face hub...")
|
94 |
-
|
95 |
-
|
|
|
96 |
print(self.ocrqa_assessors)
|
97 |
self.lang_pipeline = pipeline("langident",
|
98 |
model="impresso-project/impresso-langident",
|
|
|
89 |
for lang in bin_filenames.keys():
|
90 |
model_filename = self.config.config.filename[lang]
|
91 |
print(f"Loading model for {lang}: {model_filename}")
|
92 |
+
# if not os.path.exists(model_filename):
|
93 |
# print(f"{bin_filename} not found locally, downloading from Hugging Face hub...")
|
94 |
+
self.ocrqa_assessors[lang] = self.get_bloomfilter(model_id=self.config.config._name_or_path,
|
95 |
+
filename=model_filename)
|
96 |
+
|
97 |
print(self.ocrqa_assessors)
|
98 |
self.lang_pipeline = pipeline("langident",
|
99 |
model="impresso-project/impresso-langident",
|