Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ import os
|
|
17 |
|
18 |
MODEL_NAME = "razhan/whisper-base-hawrami-transcription"
|
19 |
BATCH_SIZE = 1
|
20 |
-
FILE_LIMIT_MB =
|
21 |
YT_LENGTH_LIMIT_S = 60 * 10 # limit to 1 hour YouTube files
|
22 |
|
23 |
device = 0 if torch.cuda.is_available() else "cpu"
|
@@ -134,7 +134,7 @@ mf_transcribe = gr.Interface(
|
|
134 |
fn=transcribe,
|
135 |
inputs=[
|
136 |
gr.Audio(sources="microphone", type="filepath"),
|
137 |
-
|
138 |
],
|
139 |
outputs="text",
|
140 |
title="Whisper Horami Demo: Transcribe Audio",
|
@@ -150,7 +150,7 @@ file_transcribe = gr.Interface(
|
|
150 |
fn=transcribe,
|
151 |
inputs=[
|
152 |
gr.Audio(sources="upload", type="filepath", label="Audio file"),
|
153 |
-
|
154 |
],
|
155 |
outputs="text",
|
156 |
title="Whisper Horami Demo: Transcribe Audio",
|
|
|
17 |
|
18 |
MODEL_NAME = "razhan/whisper-base-hawrami-transcription"
|
19 |
BATCH_SIZE = 1
|
20 |
+
FILE_LIMIT_MB = 30
|
21 |
YT_LENGTH_LIMIT_S = 60 * 10 # limit to 1 hour YouTube files
|
22 |
|
23 |
device = 0 if torch.cuda.is_available() else "cpu"
|
|
|
134 |
fn=transcribe,
|
135 |
inputs=[
|
136 |
gr.Audio(sources="microphone", type="filepath"),
|
137 |
+
gr.Radio(["transcribe", "translate"], label="Task", value="transcribe"),
|
138 |
],
|
139 |
outputs="text",
|
140 |
title="Whisper Horami Demo: Transcribe Audio",
|
|
|
150 |
fn=transcribe,
|
151 |
inputs=[
|
152 |
gr.Audio(sources="upload", type="filepath", label="Audio file"),
|
153 |
+
gr.Radio(["transcribe", "translate"], label="Task", value="transcribe"),
|
154 |
],
|
155 |
outputs="text",
|
156 |
title="Whisper Horami Demo: Transcribe Audio",
|