Spaces:
Runtime error
Runtime error
Alexander Seifert
commited on
Commit
·
a190643
1
Parent(s):
222d696
update
Browse files
app.py
CHANGED
@@ -61,7 +61,7 @@ def run():
|
|
61 |
|
62 |
cutoff = audio_b64 = None
|
63 |
if audio_file or url:
|
64 |
-
with st.expander("
|
65 |
if audio_file:
|
66 |
st.audio(audio_file)
|
67 |
cutoff = None if password == os.environ["ROOT_PASSWORD"] else 60_000
|
@@ -79,8 +79,12 @@ def run():
|
|
79 |
with st.spinner("Transkription läuft..."):
|
80 |
transcription = transcribe(url, audio_b64, cutoff)
|
81 |
|
82 |
-
|
83 |
-
|
|
|
|
|
|
|
|
|
84 |
|
85 |
st.download_button(
|
86 |
label="OTR-Datei herunterladen",
|
@@ -89,6 +93,9 @@ def run():
|
|
89 |
mime="application/json",
|
90 |
)
|
91 |
|
|
|
|
|
|
|
92 |
|
93 |
try:
|
94 |
run()
|
|
|
61 |
|
62 |
cutoff = audio_b64 = None
|
63 |
if audio_file or url:
|
64 |
+
with st.expander(("Audio" if audio_file else "Video") + " abspielen"):
|
65 |
if audio_file:
|
66 |
st.audio(audio_file)
|
67 |
cutoff = None if password == os.environ["ROOT_PASSWORD"] else 60_000
|
|
|
79 |
with st.spinner("Transkription läuft..."):
|
80 |
transcription = transcribe(url, audio_b64, cutoff)
|
81 |
|
82 |
+
st.download_button(
|
83 |
+
label="Transkript herunterladen",
|
84 |
+
data=transcription["text"],
|
85 |
+
file_name="transkript.text",
|
86 |
+
mime="text/plain",
|
87 |
+
)
|
88 |
|
89 |
st.download_button(
|
90 |
label="OTR-Datei herunterladen",
|
|
|
93 |
mime="application/json",
|
94 |
)
|
95 |
|
96 |
+
for seg in transcription["text"].split("\n\n"):
|
97 |
+
st.write(seg)
|
98 |
+
|
99 |
|
100 |
try:
|
101 |
run()
|