Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -135,11 +135,9 @@ def pipeline_worker(video_file_path: str, keywords: List[str]):
|
|
| 135 |
yield from emit(f"ERROR loading audio: {e}")
|
| 136 |
return
|
| 137 |
|
|
|
|
| 138 |
|
| 139 |
-
if "use_auth_token" in inspect.signature(huggingface_hub.hf_hub_download).parameters:
|
| 140 |
-
pass # old version, fine
|
| 141 |
-
else:
|
| 142 |
-
# patch for backward compatibility
|
| 143 |
def hf_hub_download_patch(*args, use_auth_token=None, **kwargs):
|
| 144 |
if use_auth_token is not None:
|
| 145 |
kwargs["token"] = use_auth_token
|
|
|
|
| 135 |
yield from emit(f"ERROR loading audio: {e}")
|
| 136 |
return
|
| 137 |
|
| 138 |
+
_original_hf_hub_download = huggingface_hub.hf_hub_download
|
| 139 |
|
| 140 |
+
if "use_auth_token" not in inspect.signature(huggingface_hub.hf_hub_download).parameters:
|
|
|
|
|
|
|
|
|
|
| 141 |
def hf_hub_download_patch(*args, use_auth_token=None, **kwargs):
|
| 142 |
if use_auth_token is not None:
|
| 143 |
kwargs["token"] = use_auth_token
|