Spaces:
Sleeping
Sleeping
Commit
·
e9f9f9c
1
Parent(s):
17abae8
fixed microphone
Browse files
.DS_Store
CHANGED
Binary files a/.DS_Store and b/.DS_Store differ
|
|
app.py
CHANGED
@@ -19,13 +19,15 @@ pipe = pipeline(
|
|
19 |
|
20 |
|
21 |
@spaces.GPU
|
22 |
-
def transcribe(inputs
|
23 |
if inputs is None:
|
24 |
raise gr.Error("No audio file submitted! Please upload or record an audio file before submitting your request.")
|
25 |
|
26 |
text = pipe(inputs, batch_size=BATCH_SIZE, generate_kwargs={"task": "transcribe"}, return_timestamps=True)["text"]
|
27 |
return text
|
28 |
|
|
|
|
|
29 |
file_transcribe = gr.Interface(
|
30 |
fn=transcribe,
|
31 |
inputs=[
|
@@ -43,5 +45,7 @@ file_transcribe = gr.Interface(
|
|
43 |
allow_flagging="never",
|
44 |
)
|
45 |
|
|
|
|
|
46 |
# Launch the app
|
47 |
-
|
|
|
19 |
|
20 |
|
21 |
@spaces.GPU
|
22 |
+
def transcribe(inputs):
|
23 |
if inputs is None:
|
24 |
raise gr.Error("No audio file submitted! Please upload or record an audio file before submitting your request.")
|
25 |
|
26 |
text = pipe(inputs, batch_size=BATCH_SIZE, generate_kwargs={"task": "transcribe"}, return_timestamps=True)["text"]
|
27 |
return text
|
28 |
|
29 |
+
demo = gr.Blocks()
|
30 |
+
|
31 |
file_transcribe = gr.Interface(
|
32 |
fn=transcribe,
|
33 |
inputs=[
|
|
|
45 |
allow_flagging="never",
|
46 |
)
|
47 |
|
48 |
+
with demo:
|
49 |
+
gr.TabbedInterface([file_transcribe], ["Microphone"])
|
50 |
# Launch the app
|
51 |
+
demo.launch()
|