Spaces:
Running
Running
oceansweep
commited on
Commit
•
616dd44
1
Parent(s):
e7822d5
Update app.py
Browse files
app.py
CHANGED
@@ -24,6 +24,14 @@ import yt_dlp
|
|
24 |
|
25 |
# To Do
|
26 |
# Offline diarization - https://github.com/pyannote/pyannote-audio/blob/develop/tutorials/community/offline_usage_speaker_diarization.ipynb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
|
28 |
|
29 |
####
|
@@ -1290,6 +1298,11 @@ def main(input_path, api_name=None, api_key=None, num_speakers=2, whisper_model=
|
|
1290 |
results.append(transcription_result)
|
1291 |
logging.info(f"Transcription complete: {audio_file}")
|
1292 |
|
|
|
|
|
|
|
|
|
|
|
1293 |
# Perform summarization based on the specified API
|
1294 |
if api_name and api_key:
|
1295 |
logging.debug(f"MAIN: Summarization being performed by {api_name}")
|
|
|
24 |
|
25 |
# To Do
|
26 |
# Offline diarization - https://github.com/pyannote/pyannote-audio/blob/develop/tutorials/community/offline_usage_speaker_diarization.ipynb
|
27 |
+
#
|
28 |
+
# Changes made to app.py version:
|
29 |
+
# 1. Removal of video files after conversion -> check main function
|
30 |
+
# 2. Usage of/Hardcoding HF_TOKEN as token for API calls
|
31 |
+
# 3. Usage of HuggingFace for Inference
|
32 |
+
# 4. Other stuff I can't remember. Will eventually do a diff and document them.
|
33 |
+
#
|
34 |
+
|
35 |
|
36 |
|
37 |
####
|
|
|
1298 |
results.append(transcription_result)
|
1299 |
logging.info(f"Transcription complete: {audio_file}")
|
1300 |
|
1301 |
+
if path.startswith('http'):
|
1302 |
+
# Delete the downloaded video file
|
1303 |
+
os.remove(video_path)
|
1304 |
+
logging.info(f"Deleted downloaded video file: {video_path}")
|
1305 |
+
|
1306 |
# Perform summarization based on the specified API
|
1307 |
if api_name and api_key:
|
1308 |
logging.debug(f"MAIN: Summarization being performed by {api_name}")
|