Raivis Dejus commited on
Commit
d7b5c0f
1 Parent(s): 622eda7

Adjusting Youtube tab labels and layout

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -10,8 +10,8 @@ import tempfile
10
  import os
11
 
12
  BATCH_SIZE = 8
13
- FILE_LIMIT_MB = 1000
14
- YT_LENGTH_LIMIT_S = 3600 # limit to 1 hour YouTube files
15
 
16
  device = 0 if torch.cuda.is_available() else "cpu"
17
 
@@ -115,9 +115,9 @@ transcribe = gr.Interface(
115
 
116
  * [small](https://huggingface.co/RaivisDejus/whisper-small-lv) - Reasonably fast, reasonably accurate, requiring reasonable amounts of RAM
117
 
118
- * [large](https://huggingface.co/AiLab-IMCS-UL/whisper-large-v3-lv-late-cv17) - Most accurate, developed by scientists from [ailab.lv](https://ailab.lv/). Requires most RAM and for best performance should be run on a GPU.
119
 
120
- To improve speech recognition quality, more data is needed, donate your voice on [Balsu talka](https://balsutalka.lv/)
121
  """
122
  ),
123
  allow_flagging="never",
@@ -131,10 +131,11 @@ yt_transcribe = gr.Interface(
131
  ("small", "RaivisDejus/whisper-small-lv"),
132
  ("large", "AiLab-IMCS-UL/whisper-large-v3-lv-late-cv17")
133
  ], label="Model", value="RaivisDejus/whisper-small-lv"),
134
- gr.Textbox(lines=1, placeholder="Paste the URL to a YouTube video here", label="YouTube URL"),
135
  gr.Radio([("Transcribe", "transcribe"), ("Translate to English", "translate",)], label="Task", value="transcribe")
136
  ],
137
- outputs=["html", "text"],
 
138
  title="Latvian speech recognition: Transcribe YouTube",
139
  description=("""
140
  Test Latvian speech recognition (STT) models. Three models are available:
@@ -143,9 +144,9 @@ yt_transcribe = gr.Interface(
143
 
144
  * [small](https://huggingface.co/RaivisDejus/whisper-small-lv) - Reasonably fast, reasonably accurate, requiring reasonable amounts of RAM
145
 
146
- * [large](https://huggingface.co/AiLab-IMCS-UL/whisper-large-v3-lv-late-cv17) - Most accurate, developed by scientists from [ailab.lv](https://ailab.lv/). Requires most RAM and for best performance should be run on a GPU.
147
 
148
- To improve speech recognition quality, more data is needed, donate your voice on [Balsu talka](https://balsutalka.lv/)
149
  """
150
  ),
151
  allow_flagging="never",
 
10
  import os
11
 
12
  BATCH_SIZE = 8
13
+ FILE_LIMIT_MB = 10
14
+ YT_LENGTH_LIMIT_S = 300 # limit to 5min YouTube files
15
 
16
  device = 0 if torch.cuda.is_available() else "cpu"
17
 
 
115
 
116
  * [small](https://huggingface.co/RaivisDejus/whisper-small-lv) - Reasonably fast, reasonably accurate, requiring reasonable amounts of RAM
117
 
118
+ * [large](https://huggingface.co/AiLab-IMCS-UL/whisper-large-v3-lv-late-cv17) - Most accurate, developed by scientists from [ailab.lv](https://ailab.lv/). Requires most RAM and for best performance should be run on a GPU
119
 
120
+ To improve speech recognition quality, more data is needed, add your voice on [Balsu talka](https://balsutalka.lv/)
121
  """
122
  ),
123
  allow_flagging="never",
 
131
  ("small", "RaivisDejus/whisper-small-lv"),
132
  ("large", "AiLab-IMCS-UL/whisper-large-v3-lv-late-cv17")
133
  ], label="Model", value="RaivisDejus/whisper-small-lv"),
134
+ gr.Textbox(lines=1, placeholder="Paste the URL to a YouTube video here", label="YouTube URL (max 5min long)"),
135
  gr.Radio([("Transcribe", "transcribe"), ("Translate to English", "translate",)], label="Task", value="transcribe")
136
  ],
137
+ # outputs=["html", "text"],
138
+ outputs=[gr.HTML(), gr.Textbox(label="Transcription", lines=10)],
139
  title="Latvian speech recognition: Transcribe YouTube",
140
  description=("""
141
  Test Latvian speech recognition (STT) models. Three models are available:
 
144
 
145
  * [small](https://huggingface.co/RaivisDejus/whisper-small-lv) - Reasonably fast, reasonably accurate, requiring reasonable amounts of RAM
146
 
147
+ * [large](https://huggingface.co/AiLab-IMCS-UL/whisper-large-v3-lv-late-cv17) - Most accurate, developed by scientists from [ailab.lv](https://ailab.lv/). Requires most RAM and for best performance should be run on a GPU
148
 
149
+ To improve speech recognition quality, more data is needed, add your voice on [Balsu talka](https://balsutalka.lv/)
150
  """
151
  ),
152
  allow_flagging="never",