asahi417 commited on
Commit
7f93b4d
·
1 Parent(s): 7e7b827
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -14,6 +14,8 @@ from transformers.pipelines.audio_utils import ffmpeg_read
14
  MODEL_NAME = "kotoba-tech/kotoba-whisper-v2.0"
15
  BATCH_SIZE = 16
16
  CHUNK_LENGTH_S = 15
 
 
17
  # device setting
18
  if torch.cuda.is_available():
19
  torch_dtype = torch.bfloat16
@@ -89,6 +91,7 @@ mf_transcribe = gr.Interface(
89
  title=title,
90
  description=description,
91
  allow_flagging="never",
 
92
  )
93
  file_transcribe = gr.Interface(
94
  fn=transcribe,
@@ -100,6 +103,7 @@ file_transcribe = gr.Interface(
100
  title=title,
101
  description=description,
102
  allow_flagging="never",
 
103
  )
104
  with demo:
105
  gr.TabbedInterface([mf_transcribe, file_transcribe], ["Microphone", "Audio file"])
 
14
  MODEL_NAME = "kotoba-tech/kotoba-whisper-v2.0"
15
  BATCH_SIZE = 16
16
  CHUNK_LENGTH_S = 15
17
+ EXAMPLE = "sample_diarization_japanese.mp3"
18
+
19
  # device setting
20
  if torch.cuda.is_available():
21
  torch_dtype = torch.bfloat16
 
91
  title=title,
92
  description=description,
93
  allow_flagging="never",
94
+ examples=[EXAMPLE]
95
  )
96
  file_transcribe = gr.Interface(
97
  fn=transcribe,
 
103
  title=title,
104
  description=description,
105
  allow_flagging="never",
106
+ examples=[EXAMPLE]
107
  )
108
  with demo:
109
  gr.TabbedInterface([mf_transcribe, file_transcribe], ["Microphone", "Audio file"])