Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -73,12 +73,12 @@ if st.button('Processa'):
|
|
73 |
|
74 |
#transcription = processor.batch_decode(predicted_ids, skip_special_tokens = True)
|
75 |
string1=''
|
76 |
-
|
77 |
# write srt lines
|
78 |
string1=string1+"\n" + f"{i}\n"+ f"{utils.format_timestamp(segment['start'], always_include_hours=True, decimal_marker=',')} --> " + f"{utils.format_timestamp(segment['end'], always_include_hours=True, decimal_marker=',')}\n"+ f"{segment['text'].strip().replace('-->', '->')}\n";
|
79 |
|
80 |
|
81 |
-
|
82 |
st.success("Texto Gerado")
|
83 |
# print('3')
|
84 |
|
|
|
73 |
|
74 |
#transcription = processor.batch_decode(predicted_ids, skip_special_tokens = True)
|
75 |
string1=''
|
76 |
+
for i, segment in enumerate(transcription, start=1):
|
77 |
# write srt lines
|
78 |
string1=string1+"\n" + f"{i}\n"+ f"{utils.format_timestamp(segment['start'], always_include_hours=True, decimal_marker=',')} --> " + f"{utils.format_timestamp(segment['end'], always_include_hours=True, decimal_marker=',')}\n"+ f"{segment['text'].strip().replace('-->', '->')}\n";
|
79 |
|
80 |
|
81 |
+
st.write(string1 )
|
82 |
st.success("Texto Gerado")
|
83 |
# print('3')
|
84 |
|