Spaces:
Running
on
Zero
Running
on
Zero
fix
Browse files
app.py
CHANGED
@@ -55,9 +55,7 @@ def get_prediction(inputs, task: str, language: Optional[str]):
|
|
55 |
generate_kwargs = {"task": task, "language": language}
|
56 |
prediction = pipe(inputs, return_timestamps=True, generate_kwargs=generate_kwargs)
|
57 |
text = "".join([c['text'] for c in prediction['chunks']])
|
58 |
-
text_timestamped = "\n".join([
|
59 |
-
f"{format_time(*c['timestamp'])} {c['text']}" for c in prediction['chunks']
|
60 |
-
])
|
61 |
return text, text_timestamped
|
62 |
|
63 |
|
|
|
55 |
generate_kwargs = {"task": task, "language": language}
|
56 |
prediction = pipe(inputs, return_timestamps=True, generate_kwargs=generate_kwargs)
|
57 |
text = "".join([c['text'] for c in prediction['chunks']])
|
58 |
+
text_timestamped = "\n".join([f"{format_time(*c['timestamp'])} {c['text']}" for c in prediction['chunks']])
|
|
|
|
|
59 |
return text, text_timestamped
|
60 |
|
61 |
|