Update app.py
Browse files
app.py
CHANGED
|
@@ -123,8 +123,8 @@ def get_transcripts_and_raw_times(audio_path):
|
|
| 123 |
|
| 124 |
model.cpu()
|
| 125 |
gc.collect()
|
| 126 |
-
|
| 127 |
-
|
| 128 |
|
| 129 |
# Generate CSV
|
| 130 |
button_update = gr.DownloadButton(visible=False)
|
|
@@ -189,17 +189,18 @@ def play_segment(evt: gr.SelectData, raw_ts_list, current_audio_path):
|
|
| 189 |
return gr.Audio(value=None, label="Selected Segment")
|
| 190 |
|
| 191 |
article = (
|
| 192 |
-
"<
|
| 193 |
-
"AudioDog uses <code><a href='https://huggingface.co/nvidia/parakeet-tdt-0.6b-v2'>parakeet-tdt-0.6b-v2</a></code>, a 600-million-parameter model designed for high-quality English speech recognition
|
| 194 |
-
"</p>"
|
| 195 |
"<p><strong style='color: red; font-size: 1.2em;'>Key Features:</strong></p>"
|
| 196 |
-
"<ul
|
| 197 |
-
"
|
| 198 |
-
"
|
| 199 |
-
"
|
| 200 |
-
"
|
| 201 |
"</ul>"
|
|
|
|
| 202 |
)
|
|
|
|
| 203 |
examples = [
|
| 204 |
["data/example-yt_saTD1u8PorI.mp3"],
|
| 205 |
]
|
|
@@ -208,7 +209,7 @@ examples = [
|
|
| 208 |
# Define an NVIDIA-inspired theme
|
| 209 |
nvidia_theme = gr_themes.Default(
|
| 210 |
primary_hue=gr_themes.Color(
|
| 211 |
-
c50="#
|
| 212 |
c100="#CEE3B3",
|
| 213 |
c200="#B5D58C",
|
| 214 |
c300="#9CC766",
|
|
|
|
| 123 |
|
| 124 |
model.cpu()
|
| 125 |
gc.collect()
|
| 126 |
+
if device == "cuda":
|
| 127 |
+
torch.cuda.empty_cache()
|
| 128 |
|
| 129 |
# Generate CSV
|
| 130 |
button_update = gr.DownloadButton(visible=False)
|
|
|
|
| 189 |
return gr.Audio(value=None, label="Selected Segment")
|
| 190 |
|
| 191 |
article = (
|
| 192 |
+
"<div style='font-size: 1.1em;'>"
|
| 193 |
+
"<p>AudioDog uses <code><a href='https://huggingface.co/nvidia/parakeet-tdt-0.6b-v2'>parakeet-tdt-0.6b-v2</a></code>, a 600-million-parameter model designed for high-quality English speech recognition.</p>"
|
|
|
|
| 194 |
"<p><strong style='color: red; font-size: 1.2em;'>Key Features:</strong></p>"
|
| 195 |
+
"<ul>"
|
| 196 |
+
"<li>Automatic punctuation and capitalization</li>"
|
| 197 |
+
"<li>Accurate word-level timestamps (click on a segment in the table below to play it!)</li>"
|
| 198 |
+
"<li>Efficiently transcribes long audio segments by chunking them into smaller segments and stitching them together when done.</li>"
|
| 199 |
+
"<li>MP3 support for audio input and output, works well on downloaded YouTube videos.</li>"
|
| 200 |
"</ul>"
|
| 201 |
+
"</div>"
|
| 202 |
)
|
| 203 |
+
|
| 204 |
examples = [
|
| 205 |
["data/example-yt_saTD1u8PorI.mp3"],
|
| 206 |
]
|
|
|
|
| 209 |
# Define an NVIDIA-inspired theme
|
| 210 |
nvidia_theme = gr_themes.Default(
|
| 211 |
primary_hue=gr_themes.Color(
|
| 212 |
+
c50="#E5F1D9", # Lightest green
|
| 213 |
c100="#CEE3B3",
|
| 214 |
c200="#B5D58C",
|
| 215 |
c300="#9CC766",
|