Nitzantry1
commited on
Commit
โข
219bc21
1
Parent(s):
21ad8e4
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,17 @@
|
|
|
|
1 |
import gradio as gr
|
2 |
from pyannote.audio import Pipeline
|
3 |
|
4 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
pipeline = Pipeline.from_pretrained(
|
6 |
"pyannote/speaker-diarization",
|
7 |
-
use_auth_token=
|
8 |
)
|
9 |
|
10 |
# ืคืื ืงืฆืื ืืขืืืื ืงืืืฅ ืืืืื
|
|
|
1 |
+
import os
|
2 |
import gradio as gr
|
3 |
from pyannote.audio import Pipeline
|
4 |
|
5 |
+
# ืงืจื ืืช ืืืงื ืืืืฉื ืืืฉืชื ื ืืกืืืื
|
6 |
+
hf_auth_token = os.getenv("HF_AUTH_TOKEN")
|
7 |
+
|
8 |
+
if not hf_auth_token:
|
9 |
+
raise ValueError("The environment variable 'HF_AUTH_TOKEN' is not set. Please set it in the Space.")
|
10 |
+
|
11 |
+
# ืืขื ืืช ืืืืื ืฉื pyannote ืขื ืืืงื ืืืืฉื
|
12 |
pipeline = Pipeline.from_pretrained(
|
13 |
"pyannote/speaker-diarization",
|
14 |
+
use_auth_token=hf_auth_token
|
15 |
)
|
16 |
|
17 |
# ืคืื ืงืฆืื ืืขืืืื ืงืืืฅ ืืืืื
|