yuangongfdu commited on
Commit
42f99c5
1 Parent(s): c9ac82f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -6,6 +6,9 @@ text = "[Github]"
6
  paper_link = "https://arxiv.org/pdf/2307.03183.pdf"
7
  paper_text = "[Paper]"
8
 
 
 
 
9
  def predict(audio_path, time_resolution):
10
  def round_time_resolution(time_resolution):
11
  multiple = time_resolution / 0.4
@@ -13,7 +16,6 @@ def predict(audio_path, time_resolution):
13
  rounded_time_resolution = rounded_multiple * 0.4
14
  return rounded_time_resolution
15
  audio_tagging_time_resolution = round_time_resolution(time_resolution)
16
- model = whisper.load_model("tiny")
17
  result = model.transcribe(audio_path, at_time_res=audio_tagging_time_resolution)
18
  # ASR Results
19
  print(result["text"])
 
6
  paper_link = "https://arxiv.org/pdf/2307.03183.pdf"
7
  paper_text = "[Paper]"
8
 
9
+ model = whisper.load_model("tiny")
10
+ print('model loaded')
11
+
12
  def predict(audio_path, time_resolution):
13
  def round_time_resolution(time_resolution):
14
  multiple = time_resolution / 0.4
 
16
  rounded_time_resolution = rounded_multiple * 0.4
17
  return rounded_time_resolution
18
  audio_tagging_time_resolution = round_time_resolution(time_resolution)
 
19
  result = model.transcribe(audio_path, at_time_res=audio_tagging_time_resolution)
20
  # ASR Results
21
  print(result["text"])