Spaces:
Runtime error
Runtime error
jpdiazpardo
commited on
Commit
•
3972532
1
Parent(s):
8549c9b
Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ def format_timestamp(seconds: float, always_include_hours: bool = False, decimal
|
|
37 |
|
38 |
|
39 |
def transcribe(file, task, return_timestamps):
|
40 |
-
outputs = pipe(file, batch_size=BATCH_SIZE,
|
41 |
text = outputs["text"]
|
42 |
if return_timestamps:
|
43 |
timestamps = outputs["chunks"]
|
@@ -52,7 +52,7 @@ def transcribe(file, task, return_timestamps):
|
|
52 |
file_transcribe = gr.Interface(
|
53 |
fn=transcribe,
|
54 |
inputs=[
|
55 |
-
gr.inputs.Audio(source="upload",
|
56 |
gr.inputs.Checkbox(default=False, label="Return timestamps"),
|
57 |
],
|
58 |
outputs="text",
|
|
|
37 |
|
38 |
|
39 |
def transcribe(file, task, return_timestamps):
|
40 |
+
outputs = pipe(file, batch_size=BATCH_SIZE, return_timestamps=return_timestamps)
|
41 |
text = outputs["text"]
|
42 |
if return_timestamps:
|
43 |
timestamps = outputs["chunks"]
|
|
|
52 |
file_transcribe = gr.Interface(
|
53 |
fn=transcribe,
|
54 |
inputs=[
|
55 |
+
gr.inputs.Audio(source="upload", label="Audio file", type="filepath"),
|
56 |
gr.inputs.Checkbox(default=False, label="Return timestamps"),
|
57 |
],
|
58 |
outputs="text",
|