Spaces:
Runtime error
Runtime error
Commit
•
80ca55c
1
Parent(s):
213b090
generate kwargs
Browse files
app.py
CHANGED
@@ -39,6 +39,7 @@ pipe = pipeline(
|
|
39 |
chunk_length_s=30,
|
40 |
torch_dtype=torch_dtype,
|
41 |
device=device,
|
|
|
42 |
)
|
43 |
pipe_forward = pipe._forward
|
44 |
|
@@ -77,7 +78,7 @@ def transcribe(inputs):
|
|
77 |
return result
|
78 |
|
79 |
pipe._forward = _forward_time
|
80 |
-
text = pipe(inputs, batch_size=BATCH_SIZE
|
81 |
|
82 |
# Create figure and axis
|
83 |
fig, ax = plt.subplots(figsize=(5, 5))
|
|
|
39 |
chunk_length_s=30,
|
40 |
torch_dtype=torch_dtype,
|
41 |
device=device,
|
42 |
+
generate_kwargs={"language": "en", "task": "transcribe"},
|
43 |
)
|
44 |
pipe_forward = pipe._forward
|
45 |
|
|
|
78 |
return result
|
79 |
|
80 |
pipe._forward = _forward_time
|
81 |
+
text = pipe(inputs, batch_size=BATCH_SIZE)["text"]
|
82 |
|
83 |
# Create figure and axis
|
84 |
fig, ax = plt.subplots(figsize=(5, 5))
|