raihanrifaldi commited on
Commit
a24baf0
·
1 Parent(s): 4917e47

update source_languages

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -29,8 +29,8 @@ import psutil
29
 
30
  whisper_models = ["tiny", "base", "small", "medium", "large-v1", "large-v2"]
31
  source_languages = {
32
- "Indonesia": "Indonesian",
33
- "English": "English",
34
  "zh": "Chinese",
35
  "de": "German",
36
  "es": "Spanish",
@@ -46,7 +46,8 @@ source_languages = {
46
  "ar": "Arabic",
47
  "sv": "Swedish",
48
  "it": "Italian",
49
- "hi": "Hindi",
 
50
  "fi": "Finnish",
51
  "vi": "Vietnamese",
52
  "he": "Hebrew",
@@ -351,7 +352,7 @@ video_in = gr.Video(label="Video file", mirror_webcam=False)
351
  youtube_url_in = gr.Textbox(label="Youtube url", lines=1, interactive=True)
352
  df_init = pd.DataFrame(columns=['Start', 'End', 'Speaker', 'Text'])
353
  memory = psutil.virtual_memory()
354
- selected_source_lang = gr.Dropdown(choices=source_language_list, type="value", value="en", label="Spoken language in video", interactive=True)
355
  selected_whisper_model = gr.Dropdown(choices=whisper_models, type="value", value="base", label="Selected Whisper model", interactive=True)
356
  number_speakers = gr.Number(precision=0, value=0, label="Input number of speakers for better results. If value=0, model will automatic find the best number of speakers", interactive=True)
357
  system_info = gr.Markdown(f"*Memory: {memory.total / (1024 * 1024 * 1024):.2f}GB, used: {memory.percent}%, available: {memory.available / (1024 * 1024 * 1024):.2f}GB*")
 
29
 
30
  whisper_models = ["tiny", "base", "small", "medium", "large-v1", "large-v2"]
31
  source_languages = {
32
+ "id": "Indonesian",
33
+ "en": "English",
34
  "zh": "Chinese",
35
  "de": "German",
36
  "es": "Spanish",
 
46
  "ar": "Arabic",
47
  "sv": "Swedish",
48
  "it": "Italian",
49
+
50
+ "hi": "Hindi",
51
  "fi": "Finnish",
52
  "vi": "Vietnamese",
53
  "he": "Hebrew",
 
352
  youtube_url_in = gr.Textbox(label="Youtube url", lines=1, interactive=True)
353
  df_init = pd.DataFrame(columns=['Start', 'End', 'Speaker', 'Text'])
354
  memory = psutil.virtual_memory()
355
+ selected_source_lang = gr.Dropdown(choices=source_language_list, type="value", value="id", label="Spoken language in video", interactive=True)
356
  selected_whisper_model = gr.Dropdown(choices=whisper_models, type="value", value="base", label="Selected Whisper model", interactive=True)
357
  number_speakers = gr.Number(precision=0, value=0, label="Input number of speakers for better results. If value=0, model will automatic find the best number of speakers", interactive=True)
358
  system_info = gr.Markdown(f"*Memory: {memory.total / (1024 * 1024 * 1024):.2f}GB, used: {memory.percent}%, available: {memory.available / (1024 * 1024 * 1024):.2f}GB*")