Update app.py
Browse files
app.py
CHANGED
@@ -191,8 +191,8 @@ def update_transcription(n_clicks, hf_token, url):
|
|
191 |
|
192 |
def transcribe():
|
193 |
try:
|
194 |
-
# Initialize the speaker diarization pipeline with the provided token
|
195 |
-
pipeline = Pipeline.from_pretrained("pyannote
|
196 |
if pipeline is None:
|
197 |
raise ValueError("Failed to initialize the speaker diarization pipeline")
|
198 |
print("Speaker diarization pipeline initialized successfully")
|
@@ -220,9 +220,7 @@ def update_transcription(n_clicks, hf_token, url):
|
|
220 |
]), download_data
|
221 |
else:
|
222 |
return transcript, None
|
223 |
-
|
224 |
-
print("Reached end of script definitions")
|
225 |
-
|
226 |
if __name__ == '__main__':
|
227 |
print("Starting the Dash application...")
|
228 |
app.run(debug=True, host='0.0.0.0', port=7860)
|
|
|
191 |
|
192 |
def transcribe():
|
193 |
try:
|
194 |
+
# Initialize the speaker diarization pipeline with the provided token and correct location
|
195 |
+
pipeline = Pipeline.from_pretrained("collinbarnwell/pyannote-speaker-diarization-31", use_auth_token=hf_token)
|
196 |
if pipeline is None:
|
197 |
raise ValueError("Failed to initialize the speaker diarization pipeline")
|
198 |
print("Speaker diarization pipeline initialized successfully")
|
|
|
220 |
]), download_data
|
221 |
else:
|
222 |
return transcript, None
|
223 |
+
|
|
|
|
|
224 |
if __name__ == '__main__':
|
225 |
print("Starting the Dash application...")
|
226 |
app.run(debug=True, host='0.0.0.0', port=7860)
|