Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -97,9 +97,9 @@ class Bergamot:
|
|
| 97 |
self.localfolder = f"{self.subfolder}/{model_name}"
|
| 98 |
# List all files in the repo
|
| 99 |
self.all_files = list_repo_files(self.repo_id, repo_type='model')
|
| 100 |
-
self.all_models = sorted({file.rsplit('/', 1)[0] for file in
|
| 101 |
-
|
| 102 |
-
|
| 103 |
def downloadbergamotfiles(self):
|
| 104 |
print('input text type:', type(self.input_text), len(self.all_files), 'installed_pairs', self.installed_pairs, 'defaultlocalfolder', self.localfolder)
|
| 105 |
try:
|
|
|
|
| 97 |
self.localfolder = f"{self.subfolder}/{model_name}"
|
| 98 |
# List all files in the repo
|
| 99 |
self.all_files = list_repo_files(self.repo_id, repo_type='model')
|
| 100 |
+
self.all_models = sorted({file.rsplit('/', 1)[0] for file in self.all_files if '/' in file})
|
| 101 |
+
self.models_for_sltl = [f"{branch}/{self.sl}{self.tl}" for branch in self.branches if f"{branch}/{self.sl}{self.tl}" in self.all_models]
|
| 102 |
+
print(f'{self.all_models=}', f'{self.models_for_sltl=}')
|
| 103 |
def downloadbergamotfiles(self):
|
| 104 |
print('input text type:', type(self.input_text), len(self.all_files), 'installed_pairs', self.installed_pairs, 'defaultlocalfolder', self.localfolder)
|
| 105 |
try:
|