Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -127,11 +127,11 @@ def bergamot(input_text: list[str] = Query(description="Input list of strings"),
|
|
| 127 |
model_files = [f.split(f'{model_name}/')[1] for f in fullmodel_files]
|
| 128 |
print('branch_files', len(branch_files), 'model_files', model_files)
|
| 129 |
for file_path in model_files:
|
| 130 |
-
if
|
| 131 |
local_path = hf_hub_download(repo_id=repo_id, subfolder=model_name, filename=file_path, local_dir=subfolder)
|
| 132 |
print(f"Downloaded to: {local_path}") # Downloaded to: deen/base/deen/config.yml
|
| 133 |
# localfolder = local_path.rsplit('/', 1)[0]
|
| 134 |
-
installed_pairs.add(
|
| 135 |
try:
|
| 136 |
dry_run = hf_hub_download(repo_id=repo_id, subfolder=model_name, filename='config.yml', local_dir=subfolder)
|
| 137 |
print('installed_pairs', installed_pairs, 'localfolder', localfolder, 'dry_run', dry_run)
|
|
|
|
| 127 |
model_files = [f.split(f'{model_name}/')[1] for f in fullmodel_files]
|
| 128 |
print('branch_files', len(branch_files), 'model_files', model_files)
|
| 129 |
for file_path in model_files:
|
| 130 |
+
if localfolder not in installed_pairs:
|
| 131 |
local_path = hf_hub_download(repo_id=repo_id, subfolder=model_name, filename=file_path, local_dir=subfolder)
|
| 132 |
print(f"Downloaded to: {local_path}") # Downloaded to: deen/base/deen/config.yml
|
| 133 |
# localfolder = local_path.rsplit('/', 1)[0]
|
| 134 |
+
installed_pairs.add(localfolder)
|
| 135 |
try:
|
| 136 |
dry_run = hf_hub_download(repo_id=repo_id, subfolder=model_name, filename='config.yml', local_dir=subfolder)
|
| 137 |
print('installed_pairs', installed_pairs, 'localfolder', localfolder, 'dry_run', dry_run)
|