asahi417 commited on
Commit
f670d94
·
1 Parent(s): a72cb3f
Files changed (1) hide show
  1. app.py +1 -3
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