Update modeling_lang.py
Browse files- modeling_lang.py +2 -2
modeling_lang.py
CHANGED
|
@@ -28,9 +28,9 @@ class LangDetectorModel(PreTrainedModel):
|
|
| 28 |
# Check if the file is already present locally, else download it
|
| 29 |
if not os.path.exists(bin_filename):
|
| 30 |
print(f"{bin_filename} not found locally, downloading from Hugging Face hub...")
|
| 31 |
-
|
| 32 |
filename=bin_filename)
|
| 33 |
-
print(f"Downloaded .bin file at: {
|
| 34 |
else:
|
| 35 |
print(f"{bin_filename} found locally.")
|
| 36 |
|
|
|
|
| 28 |
# Check if the file is already present locally, else download it
|
| 29 |
if not os.path.exists(bin_filename):
|
| 30 |
print(f"{bin_filename} not found locally, downloading from Hugging Face hub...")
|
| 31 |
+
bin_filename = hf_hub_download(repo_id=self.config.config._name_or_path,
|
| 32 |
filename=bin_filename)
|
| 33 |
+
print(f"Downloaded .bin file at: {bin_filename}")
|
| 34 |
else:
|
| 35 |
print(f"{bin_filename} found locally.")
|
| 36 |
|