Spaces:
Running
on
Zero
Running
on
Zero
variable output returned
Browse files- whisper2.py +4 -1
whisper2.py
CHANGED
@@ -99,4 +99,7 @@ def generate(audio):
|
|
99 |
)
|
100 |
output = processor.batch_decode(pred_ids, skip_special_tokens=True)
|
101 |
|
102 |
-
|
|
|
|
|
|
|
|
99 |
)
|
100 |
output = processor.batch_decode(pred_ids, skip_special_tokens=True)
|
101 |
|
102 |
+
if length <= 30:
|
103 |
+
return output[1:]
|
104 |
+
else:
|
105 |
+
return output[0]
|