fix: convert f-strings in find_model_files to .format()
This commit is contained in:
@@ -323,11 +323,11 @@ filename_filter = sys.argv[3]
|
|||||||
# Try both with and without 'hub/' subdirectory for compatibility
|
# Try both with and without 'hub/' subdirectory for compatibility
|
||||||
cache_path = Path(cache_dir)
|
cache_path = Path(cache_dir)
|
||||||
repo_path = repo_id.replace('/', '--')
|
repo_path = repo_id.replace('/', '--')
|
||||||
model_dir = cache_path / f'models--{repo_path}'
|
model_dir = cache_path / 'models--{0}'.format(repo_path)
|
||||||
|
|
||||||
# Fallback to hub/ subdirectory if direct path doesn't exist
|
# Fallback to hub/ subdirectory if direct path doesn't exist
|
||||||
if not model_dir.exists():
|
if not model_dir.exists():
|
||||||
model_dir = cache_path / 'hub' / f'models--{repo_path}'
|
model_dir = cache_path / 'hub' / 'models--{0}'.format(repo_path)
|
||||||
|
|
||||||
if not model_dir.exists():
|
if not model_dir.exists():
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|||||||
Reference in New Issue
Block a user