Spaces:
Sleeping
Sleeping
Commit
·
cc148c5
1
Parent(s):
fe075ed
Update app.py
Browse files
app.py
CHANGED
@@ -88,14 +88,14 @@ def time(secs):
|
|
88 |
return datetime.timedelta(seconds=round(secs))
|
89 |
|
90 |
def get_output(segments):
|
91 |
-
|
92 |
for (i, segment) in enumerate(segments):
|
93 |
if i == 0 or segments[i - 1]["speaker"] != segment["speaker"]:
|
94 |
if i != 0:
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
return
|
99 |
|
100 |
|
101 |
def text_to_short_summary():
|
|
|
88 |
return datetime.timedelta(seconds=round(secs))
|
89 |
|
90 |
def get_output(segments):
|
91 |
+
out = ''
|
92 |
for (i, segment) in enumerate(segments):
|
93 |
if i == 0 or segments[i - 1]["speaker"] != segment["speaker"]:
|
94 |
if i != 0:
|
95 |
+
out += '\n\n'
|
96 |
+
out += segment["speaker"] + ' ' + str(time(segment["start"])) + '\n\n'
|
97 |
+
out += segment["text"][1:] + ' '
|
98 |
+
return out
|
99 |
|
100 |
|
101 |
def text_to_short_summary():
|