Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -119,11 +119,13 @@ def bergamot(input_text: str = Query(description="Input strings"), sl: str = 'de
|
|
| 119 |
print(len(all_files), 'installed_pairs', installed_pairs)
|
| 120 |
for branch in branches:
|
| 121 |
branch_files = [f for f in all_files if f.startswith(branch)]
|
| 122 |
-
|
|
|
|
|
|
|
| 123 |
print('branch_files', len(branch_files), 'model_files', model_files)
|
| 124 |
for file_path in model_files:
|
| 125 |
if subfolder not in installed_pairs:
|
| 126 |
-
local_path = hf_hub_download(repo_id=repo_id, filename=file_path)
|
| 127 |
print(f"Downloaded to: {local_path}")
|
| 128 |
installed_pairs.add(subfolder)
|
| 129 |
print('installed_pairs', installed_pairs)
|
|
|
|
| 119 |
print(len(all_files), 'installed_pairs', installed_pairs)
|
| 120 |
for branch in branches:
|
| 121 |
branch_files = [f for f in all_files if f.startswith(branch)]
|
| 122 |
+
fullmodel_files = [f for f in branch_files if f.startswith(model_name)]
|
| 123 |
+
print('branch_files', len(branch_files), 'fullmodel_files', fullmodel_files)
|
| 124 |
+
model_files = [f.split(f'{model_name}/')[1] for f in fullmodel_files]
|
| 125 |
print('branch_files', len(branch_files), 'model_files', model_files)
|
| 126 |
for file_path in model_files:
|
| 127 |
if subfolder not in installed_pairs:
|
| 128 |
+
local_path = hf_hub_download(repo_id=repo_id, subfolder=model_name, filename=file_path)
|
| 129 |
print(f"Downloaded to: {local_path}")
|
| 130 |
installed_pairs.add(subfolder)
|
| 131 |
print('installed_pairs', installed_pairs)
|