Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import os
|
| 2 |
-
|
| 3 |
import uuid
|
| 4 |
import yt_dlp as youtube_dl
|
| 5 |
from typing import Generator
|
|
@@ -63,6 +63,7 @@ class YouTubeTranscriber:
|
|
| 63 |
return df
|
| 64 |
|
| 65 |
# Function to be called by the Gradio interface
|
|
|
|
| 66 |
def transcribe_youtube_video(url: str, model_path: str = "distil-large-v2") -> str:
|
| 67 |
yt_transcriber = YouTubeTranscriber(model_path)
|
| 68 |
audio_path = yt_transcriber.download_audio(url)
|
|
|
|
| 1 |
import os
|
| 2 |
+
import spaces
|
| 3 |
import uuid
|
| 4 |
import yt_dlp as youtube_dl
|
| 5 |
from typing import Generator
|
|
|
|
| 63 |
return df
|
| 64 |
|
| 65 |
# Function to be called by the Gradio interface
|
| 66 |
+
@spaces.GPU
|
| 67 |
def transcribe_youtube_video(url: str, model_path: str = "distil-large-v2") -> str:
|
| 68 |
yt_transcriber = YouTubeTranscriber(model_path)
|
| 69 |
audio_path = yt_transcriber.download_audio(url)
|