Spaces:
Running
Running
Performance Improvements
Browse files
app.py
CHANGED
|
@@ -24,7 +24,10 @@ def process_video(video_file):
|
|
| 24 |
"victor-upmeet/whisperx:84d2ad2d6194fe98a17d2b60bef1c7f910c46b2f6fd38996ca457afd9c8abfcb",
|
| 25 |
input={"audio_file": audio_f},
|
| 26 |
language="en",
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
| 28 |
)
|
| 29 |
finally:
|
| 30 |
if temp_audio_file and os.path.exists(temp_audio_file):
|
|
@@ -68,7 +71,8 @@ with gr.Blocks(theme="monochrome", css="""
|
|
| 68 |
video_input = gr.Video(
|
| 69 |
label="Input Video File (.mp4)",
|
| 70 |
interactive=True,
|
| 71 |
-
sources=["upload"]
|
|
|
|
| 72 |
)
|
| 73 |
with gr.Row(elem_classes="transcribe-btn-center"):
|
| 74 |
transcribe_btn = gr.Button("Transcribe", scale=0)
|
|
@@ -85,4 +89,4 @@ with gr.Blocks(theme="monochrome", css="""
|
|
| 85 |
outputs=text_output
|
| 86 |
)
|
| 87 |
|
| 88 |
-
demo.launch()
|
|
|
|
| 24 |
"victor-upmeet/whisperx:84d2ad2d6194fe98a17d2b60bef1c7f910c46b2f6fd38996ca457afd9c8abfcb",
|
| 25 |
input={"audio_file": audio_f},
|
| 26 |
language="en",
|
| 27 |
+
batch_size=128,
|
| 28 |
+
api_token=REPLICATE_API_TOKEN,
|
| 29 |
+
align_output=False,
|
| 30 |
+
diarization=False
|
| 31 |
)
|
| 32 |
finally:
|
| 33 |
if temp_audio_file and os.path.exists(temp_audio_file):
|
|
|
|
| 71 |
video_input = gr.Video(
|
| 72 |
label="Input Video File (.mp4)",
|
| 73 |
interactive=True,
|
| 74 |
+
sources=["upload"],
|
| 75 |
+
streaming=True
|
| 76 |
)
|
| 77 |
with gr.Row(elem_classes="transcribe-btn-center"):
|
| 78 |
transcribe_btn = gr.Button("Transcribe", scale=0)
|
|
|
|
| 89 |
outputs=text_output
|
| 90 |
)
|
| 91 |
|
| 92 |
+
demo.launch(max_file_size="200MB")
|