Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -59,13 +59,9 @@ def transcribe(file, return_timestamps=False,lang_nn=False):
|
|
| 59 |
warning_message=None
|
| 60 |
|
| 61 |
if audio_duration > max_audio_length:
|
| 62 |
-
#warning_message = (
|
| 63 |
-
# "<b style='color:red;'>⚠️ Advarsel:</b> "
|
| 64 |
-
# "Lydfilen er lengre enn 30 minutter. Kun de første 30 minuttene vil bli transkribert."
|
| 65 |
-
#)
|
| 66 |
warning_message = (
|
| 67 |
-
"
|
| 68 |
-
"Kun de første 30 minuttene vil bli transkribert."
|
| 69 |
)
|
| 70 |
# Trim the waveform to the first 30 minutes
|
| 71 |
waveform = waveform[:, :int(max_audio_length * sample_rate)]
|
|
@@ -177,7 +173,7 @@ with demo:
|
|
| 177 |
],
|
| 178 |
|
| 179 |
outputs=[
|
| 180 |
-
gr.
|
| 181 |
gr.HTML(label="text"),
|
| 182 |
gr.File(label="Last ned transkripsjon")
|
| 183 |
],
|
|
|
|
| 59 |
warning_message=None
|
| 60 |
|
| 61 |
if audio_duration > max_audio_length:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
warning_message = (
|
| 63 |
+
"<b style='color:red;'>⚠️ Advarsel:</b> "
|
| 64 |
+
"Lydfilen er lengre enn 30 minutter. Kun de første 30 minuttene vil bli transkribert."
|
| 65 |
)
|
| 66 |
# Trim the waveform to the first 30 minutes
|
| 67 |
waveform = waveform[:, :int(max_audio_length * sample_rate)]
|
|
|
|
| 173 |
],
|
| 174 |
|
| 175 |
outputs=[
|
| 176 |
+
gr.HTMLlabel="Varsel"),
|
| 177 |
gr.HTML(label="text"),
|
| 178 |
gr.File(label="Last ned transkripsjon")
|
| 179 |
],
|