Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,15 @@ BATCH_SIZE = 8
|
|
16 |
|
17 |
repo = pipeline(task="automatic-speech-recognition", model="openai/whisper-large-v3-turbo", chunk_length_s=30, device=DEVICE)
|
18 |
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
def transcribe(inputs, task):
|
21 |
if inputs is None: raise gr.Error("Invalid input.")
|
22 |
output = repo(inputs, batch_size=BATCH_SIZE, generate_kwargs={"task": task}, return_timestamps=True)["text"]
|
|
|
16 |
|
17 |
repo = pipeline(task="automatic-speech-recognition", model="openai/whisper-large-v3-turbo", chunk_length_s=30, device=DEVICE)
|
18 |
|
19 |
+
css = '''
|
20 |
+
.gradio-container{max-width: 560px !important}
|
21 |
+
h1{text-align:center}
|
22 |
+
footer {
|
23 |
+
visibility: hidden
|
24 |
+
}
|
25 |
+
'''
|
26 |
+
|
27 |
+
@spaces.GPU(15)
|
28 |
def transcribe(inputs, task):
|
29 |
if inputs is None: raise gr.Error("Invalid input.")
|
30 |
output = repo(inputs, batch_size=BATCH_SIZE, generate_kwargs={"task": task}, return_timestamps=True)["text"]
|