Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -107,7 +107,7 @@ def bergamot(input_text: list[str] = Query(description="Input string or list of
|
|
| 107 |
"""
|
| 108 |
try:
|
| 109 |
import bergamot
|
| 110 |
-
#
|
| 111 |
# input_text = [input_text] if isinstance(input_text, str) else input_text
|
| 112 |
config = bergamot.ServiceConfig(numWorkers=4)
|
| 113 |
service = bergamot.Service(config)
|
|
@@ -130,8 +130,8 @@ def bergamot(input_text: list[str] = Query(description="Input string or list of
|
|
| 130 |
# dry_run (bool, optional, defaults to False) — If True, perform a dry run without actually downloading the file. Returns a DryRunFileInfo object containing information about what would be downloaded.
|
| 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 |
-
|
| 134 |
-
if
|
| 135 |
installed_pairs.add(localfolder)
|
| 136 |
try:
|
| 137 |
dry_run = hf_hub_download(repo_id=repo_id, subfolder=model_name, filename='config.yml', local_dir=subfolder)
|
|
|
|
| 107 |
"""
|
| 108 |
try:
|
| 109 |
import bergamot
|
| 110 |
+
# local_path = ''
|
| 111 |
# input_text = [input_text] if isinstance(input_text, str) else input_text
|
| 112 |
config = bergamot.ServiceConfig(numWorkers=4)
|
| 113 |
service = bergamot.Service(config)
|
|
|
|
| 130 |
# dry_run (bool, optional, defaults to False) — If True, perform a dry run without actually downloading the file. Returns a DryRunFileInfo object containing information about what would be downloaded.
|
| 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 |
+
# if local_path and isinstance(local_path, str):
|
| 134 |
+
if localfolder in all_files:
|
| 135 |
installed_pairs.add(localfolder)
|
| 136 |
try:
|
| 137 |
dry_run = hf_hub_download(repo_id=repo_id, subfolder=model_name, filename='config.yml', local_dir=subfolder)
|