Spaces:
Sleeping
Sleeping
alexanderander30
commited on
Commit
•
e46ac57
1
Parent(s):
8c92dca
Update app.py
Browse files
app.py
CHANGED
@@ -2,11 +2,9 @@ import os
|
|
2 |
import gradio as gr
|
3 |
from faster_whisper import WhisperModel
|
4 |
from pytube import YouTube
|
5 |
-
import torch
|
6 |
|
7 |
# Inicializar el modelo Whisper
|
8 |
-
|
9 |
-
model = WhisperModel("base", device=device, compute_type="float16")
|
10 |
|
11 |
def transcribe_audio(audio_path):
|
12 |
segments, _ = model.transcribe(audio_path, beam_size=5)
|
@@ -42,7 +40,7 @@ iface = gr.Interface(
|
|
42 |
],
|
43 |
outputs="text",
|
44 |
title="Whisper Transcription App",
|
45 |
-
description="Upload an audio file or provide a YouTube URL to transcribe."
|
46 |
)
|
47 |
|
48 |
# Lanzar la aplicación
|
|
|
2 |
import gradio as gr
|
3 |
from faster_whisper import WhisperModel
|
4 |
from pytube import YouTube
|
|
|
5 |
|
6 |
# Inicializar el modelo Whisper
|
7 |
+
model = WhisperModel("base", device="cpu", compute_type="int8")
|
|
|
8 |
|
9 |
def transcribe_audio(audio_path):
|
10 |
segments, _ = model.transcribe(audio_path, beam_size=5)
|
|
|
40 |
],
|
41 |
outputs="text",
|
42 |
title="Whisper Transcription App",
|
43 |
+
description="Upload an audio file or provide a YouTube URL to transcribe. Note: This is running on CPU, so processing might be slower."
|
44 |
)
|
45 |
|
46 |
# Lanzar la aplicación
|