Spaces:
Running
Running
oceansweep
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -24,13 +24,13 @@ 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 |
# 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 |
-
# 5. Dark mode changes under gradio
|
34 |
#
|
35 |
|
36 |
|
@@ -1201,12 +1201,7 @@ def launch_ui(demo_mode=False):
|
|
1201 |
return "\n".join([item["text"] for item in json_data])
|
1202 |
else:
|
1203 |
return ""
|
1204 |
-
|
1205 |
-
# with gr.Blocks(theme='bethecloud/storj_theme') as demo:
|
1206 |
-
# with gr.Column(scale=3):
|
1207 |
-
# with gr.Group():
|
1208 |
-
# dropdown.render()
|
1209 |
-
# toggle_dark = gr.Button(value="Toggle Dark").style(full_width=True)
|
1210 |
dropdown.change(None, dropdown, None, _js=js)
|
1211 |
toggle_dark.click(
|
1212 |
None,
|
@@ -1246,6 +1241,7 @@ def launch_ui(demo_mode=False):
|
|
1246 |
description="Submit a video URL for transcription and summarization.",
|
1247 |
allow_flagging="never",
|
1248 |
theme='bethecloud/storj_theme'
|
|
|
1249 |
)
|
1250 |
|
1251 |
iface.launch(share=True)
|
@@ -1263,7 +1259,7 @@ def launch_ui(demo_mode=False):
|
|
1263 |
####################################################################################################################################
|
1264 |
# Main()
|
1265 |
#
|
1266 |
-
def main(input_path, api_name=None, api_key=None, num_speakers=2, whisper_model="small.en", offset=0, vad_filter=False, download_video_flag=False):
|
1267 |
if input_path is None and args.user_interface:
|
1268 |
return []
|
1269 |
start_time = time.monotonic()
|
|
|
24 |
|
25 |
# To Do
|
26 |
# Offline diarization - https://github.com/pyannote/pyannote-audio/blob/develop/tutorials/community/offline_usage_speaker_diarization.ipynb
|
27 |
+
# Dark mode changes under gradio
|
28 |
#
|
29 |
# Changes made to app.py version:
|
30 |
# 1. Removal of video files after conversion -> check main function
|
31 |
# 2. Usage of/Hardcoding HF_TOKEN as token for API calls
|
32 |
# 3. Usage of HuggingFace for Inference
|
33 |
# 4. Other stuff I can't remember. Will eventually do a diff and document them.
|
|
|
34 |
#
|
35 |
|
36 |
|
|
|
1201 |
return "\n".join([item["text"] for item in json_data])
|
1202 |
else:
|
1203 |
return ""
|
1204 |
+
|
|
|
|
|
|
|
|
|
|
|
1205 |
dropdown.change(None, dropdown, None, _js=js)
|
1206 |
toggle_dark.click(
|
1207 |
None,
|
|
|
1241 |
description="Submit a video URL for transcription and summarization.",
|
1242 |
allow_flagging="never",
|
1243 |
theme='bethecloud/storj_theme'
|
1244 |
+
# FIXME - Figure out how to enable dark mode...
|
1245 |
)
|
1246 |
|
1247 |
iface.launch(share=True)
|
|
|
1259 |
####################################################################################################################################
|
1260 |
# Main()
|
1261 |
#
|
1262 |
+
def main(input_path, api_name=None, api_key=None, num_speakers=2, whisper_model="small.en", offset=0, vad_filter=False, download_video_flag=False, demo_mode=False):
|
1263 |
if input_path is None and args.user_interface:
|
1264 |
return []
|
1265 |
start_time = time.monotonic()
|