Spaces:
Sleeping
Sleeping
Upgrade deps
Browse files- README.md +1 -1
- app.py +8 -10
- requirements.txt +4 -3
README.md
CHANGED
|
@@ -4,7 +4,7 @@ emoji: 🔥
|
|
| 4 |
colorFrom: pink
|
| 5 |
colorTo: blue
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version:
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
---
|
|
|
|
| 4 |
colorFrom: pink
|
| 5 |
colorTo: blue
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 5.21.0
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
---
|
app.py
CHANGED
|
@@ -6,6 +6,7 @@ from transformers import pipeline
|
|
| 6 |
from transformers.pipelines.audio_utils import ffmpeg_read
|
| 7 |
|
| 8 |
import tempfile
|
|
|
|
| 9 |
import os
|
| 10 |
|
| 11 |
MODEL_NAME = "dataprizma/whisper-large-v3-turbo"
|
|
@@ -93,11 +94,10 @@ demo = gr.Blocks()
|
|
| 93 |
mf_transcribe = gr.Interface(
|
| 94 |
fn=transcribe,
|
| 95 |
inputs=[
|
| 96 |
-
gr.
|
| 97 |
-
gr.
|
| 98 |
],
|
| 99 |
outputs="text",
|
| 100 |
-
layout="horizontal",
|
| 101 |
theme="huggingface",
|
| 102 |
title="Whisper Large V3: Transcribe Audio",
|
| 103 |
description=(
|
|
@@ -109,11 +109,10 @@ mf_transcribe = gr.Interface(
|
|
| 109 |
file_transcribe = gr.Interface(
|
| 110 |
fn=transcribe,
|
| 111 |
inputs=[
|
| 112 |
-
gr.
|
| 113 |
-
gr.
|
| 114 |
],
|
| 115 |
outputs="text",
|
| 116 |
-
layout="horizontal",
|
| 117 |
theme="huggingface",
|
| 118 |
title="Whisper Large V3: Transcribe Audio",
|
| 119 |
description=(
|
|
@@ -125,11 +124,10 @@ file_transcribe = gr.Interface(
|
|
| 125 |
yt_transcribe = gr.Interface(
|
| 126 |
fn=yt_transcribe,
|
| 127 |
inputs=[
|
| 128 |
-
gr.
|
| 129 |
-
gr.
|
| 130 |
],
|
| 131 |
outputs=["html", "text"],
|
| 132 |
-
layout="horizontal",
|
| 133 |
theme="huggingface",
|
| 134 |
title="Whisper Large V3: Transcribe YouTube",
|
| 135 |
description=(
|
|
@@ -141,4 +139,4 @@ yt_transcribe = gr.Interface(
|
|
| 141 |
with demo:
|
| 142 |
gr.TabbedInterface([mf_transcribe, file_transcribe, yt_transcribe], ["Microphone", "Audio file", "YouTube"])
|
| 143 |
|
| 144 |
-
demo.launch(
|
|
|
|
| 6 |
from transformers.pipelines.audio_utils import ffmpeg_read
|
| 7 |
|
| 8 |
import tempfile
|
| 9 |
+
import time
|
| 10 |
import os
|
| 11 |
|
| 12 |
MODEL_NAME = "dataprizma/whisper-large-v3-turbo"
|
|
|
|
| 94 |
mf_transcribe = gr.Interface(
|
| 95 |
fn=transcribe,
|
| 96 |
inputs=[
|
| 97 |
+
gr.Audio(type="filepath"),
|
| 98 |
+
gr.Radio(["transcribe", "translate"], label="Task"),
|
| 99 |
],
|
| 100 |
outputs="text",
|
|
|
|
| 101 |
theme="huggingface",
|
| 102 |
title="Whisper Large V3: Transcribe Audio",
|
| 103 |
description=(
|
|
|
|
| 109 |
file_transcribe = gr.Interface(
|
| 110 |
fn=transcribe,
|
| 111 |
inputs=[
|
| 112 |
+
gr.Audio(type="filepath", label="Audio file"),
|
| 113 |
+
gr.Radio(["transcribe", "translate"], label="Task"),
|
| 114 |
],
|
| 115 |
outputs="text",
|
|
|
|
| 116 |
theme="huggingface",
|
| 117 |
title="Whisper Large V3: Transcribe Audio",
|
| 118 |
description=(
|
|
|
|
| 124 |
yt_transcribe = gr.Interface(
|
| 125 |
fn=yt_transcribe,
|
| 126 |
inputs=[
|
| 127 |
+
gr.Textbox(lines=1, placeholder="Paste the URL to a YouTube video here", label="YouTube URL"),
|
| 128 |
+
gr.Radio(["transcribe", "translate"], label="Task")
|
| 129 |
],
|
| 130 |
outputs=["html", "text"],
|
|
|
|
| 131 |
theme="huggingface",
|
| 132 |
title="Whisper Large V3: Transcribe YouTube",
|
| 133 |
description=(
|
|
|
|
| 139 |
with demo:
|
| 140 |
gr.TabbedInterface([mf_transcribe, file_transcribe, yt_transcribe], ["Microphone", "Audio file", "YouTube"])
|
| 141 |
|
| 142 |
+
demo.launch()
|
requirements.txt
CHANGED
|
@@ -1,3 +1,4 @@
|
|
| 1 |
-
|
| 2 |
-
torch
|
| 3 |
-
yt-dlp
|
|
|
|
|
|
| 1 |
+
transformers==4.49.0
|
| 2 |
+
torch==2.6.0
|
| 3 |
+
yt-dlp==2025.2.19
|
| 4 |
+
gradio==5.21.0
|