Commit
·
27d03da
1
Parent(s):
777cb0a
a bit debug
Browse files- modeling_ocrqa.py +3 -1
modeling_ocrqa.py
CHANGED
@@ -84,14 +84,16 @@ class QAAssessmentModel(PreTrainedModel):
|
|
84 |
"other": self.config.config.filename["other"]}
|
85 |
|
86 |
self.ocrqa_assessors = {}
|
|
|
87 |
# model_filename = self.config.config.model[lang]
|
88 |
-
for lang in bin_filenames:
|
89 |
model_filename = self.config.config.filename[lang]
|
90 |
# Check if the file is already present locally, else download it
|
91 |
if not os.path.exists(model_filename):
|
92 |
# print(f"{bin_filename} not found locally, downloading from Hugging Face hub...")
|
93 |
self.ocrqa_assessors[lang] = hf_hub_download(repo_id=self.config.config._name_or_path,
|
94 |
filename=model_filename)
|
|
|
95 |
self.lang_pipeline = pipeline("langident",
|
96 |
model="impresso-project/impresso-langident",
|
97 |
trust_remote_code=True,
|
|
|
84 |
"other": self.config.config.filename["other"]}
|
85 |
|
86 |
self.ocrqa_assessors = {}
|
87 |
+
|
88 |
# model_filename = self.config.config.model[lang]
|
89 |
+
for lang in bin_filenames.keys():
|
90 |
model_filename = self.config.config.filename[lang]
|
91 |
# Check if the file is already present locally, else download it
|
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] = hf_hub_download(repo_id=self.config.config._name_or_path,
|
95 |
filename=model_filename)
|
96 |
+
print(self.ocrqa_assessors)
|
97 |
self.lang_pipeline = pipeline("langident",
|
98 |
model="impresso-project/impresso-langident",
|
99 |
trust_remote_code=True,
|