Spaces:
Running
on
Zero
Running
on
Zero
liuyang
commited on
Commit
·
a1d23de
1
Parent(s):
4906209
library
Browse files
app.py
CHANGED
@@ -34,6 +34,14 @@ import requests
|
|
34 |
import base64
|
35 |
from pyannote.audio import Pipeline
|
36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
# Lazy global holder ----------------------------------------------------------
|
38 |
_whisper = None
|
39 |
_diarizer = None
|
|
|
34 |
import base64
|
35 |
from pyannote.audio import Pipeline
|
36 |
|
37 |
+
import os, importlib.util, pathlib, site
|
38 |
+
|
39 |
+
spec = importlib.util.find_spec("nvidia.cudnn")
|
40 |
+
if spec is not None: # wheel is installed
|
41 |
+
cudnn_dir = pathlib.Path(spec.origin).parent / "lib"
|
42 |
+
os.environ["LD_LIBRARY_PATH"] = (
|
43 |
+
f"{cudnn_dir}:{os.environ.get('LD_LIBRARY_PATH','')}"
|
44 |
+
)
|
45 |
# Lazy global holder ----------------------------------------------------------
|
46 |
_whisper = None
|
47 |
_diarizer = None
|