Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -130,15 +130,16 @@ def bergamot(input_text: list[str] = Query(description="Input string or list of
|
|
| 130 |
local_path = hf_hub_download(repo_id=repo_id, subfolder=model_name, filename=file_path, local_dir=subfolder)
|
| 131 |
print(f"Downloaded to: {local_path}") # Downloaded to: deen/base/deen/config.yml
|
| 132 |
## Check if model/localfolder in repo files, add to set if exists
|
| 133 |
-
modelcheck = [i for i in all_files if
|
|
|
|
| 134 |
if modelcheck:
|
| 135 |
-
print('Add to set after modelcheck')
|
| 136 |
installed_pairs.add(localfolder)
|
| 137 |
try:
|
| 138 |
dry_run = hf_hub_download(repo_id=repo_id, subfolder=model_name, filename='config.yml', local_dir=subfolder)
|
| 139 |
print('installed_pairs', installed_pairs, 'localfolder', localfolder, 'dry_run', type(dry_run), dry_run)
|
| 140 |
if isinstance(dry_run, str):
|
| 141 |
-
print('Add to set after dryrun')
|
| 142 |
installed_pairs.add(localfolder)
|
| 143 |
except Exception as dryrunerror:
|
| 144 |
print('installed_pairs', installed_pairs, 'localfolder', localfolder, 'dry_runerror', dryrunerror)
|
|
|
|
| 130 |
local_path = hf_hub_download(repo_id=repo_id, subfolder=model_name, filename=file_path, local_dir=subfolder)
|
| 131 |
print(f"Downloaded to: {local_path}") # Downloaded to: deen/base/deen/config.yml
|
| 132 |
## Check if model/localfolder in repo files, add to set if exists
|
| 133 |
+
modelcheck = [i for i in all_files if model_name in i]
|
| 134 |
+
print('Modelcheck', modelcheck)
|
| 135 |
if modelcheck:
|
| 136 |
+
print('Add to set after modelcheck', modelcheck)
|
| 137 |
installed_pairs.add(localfolder)
|
| 138 |
try:
|
| 139 |
dry_run = hf_hub_download(repo_id=repo_id, subfolder=model_name, filename='config.yml', local_dir=subfolder)
|
| 140 |
print('installed_pairs', installed_pairs, 'localfolder', localfolder, 'dry_run', type(dry_run), dry_run)
|
| 141 |
if isinstance(dry_run, str):
|
| 142 |
+
print('Add to set after dryrun', dry_run)
|
| 143 |
installed_pairs.add(localfolder)
|
| 144 |
except Exception as dryrunerror:
|
| 145 |
print('installed_pairs', installed_pairs, 'localfolder', localfolder, 'dry_runerror', dryrunerror)
|