shideqin commited on
Commit
e47c44a
1 Parent(s): 1ec33c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -71,7 +71,7 @@ def format_timestamp(seconds: float, always_include_hours: bool = False, decimal
71
 
72
 
73
  if __name__ == "__main__":
74
- pipeline = FlaxWhisperPipline(checkpoint, dtype=jnp.float16, batch_size=BATCH_SIZE, language="chinese")
75
  stride_length_s = CHUNK_LENGTH_S / 6
76
  chunk_len = round(CHUNK_LENGTH_S * pipeline.feature_extractor.sampling_rate)
77
  stride_left = stride_right = round(stride_length_s * pipeline.feature_extractor.sampling_rate)
@@ -97,7 +97,7 @@ if __name__ == "__main__":
97
  # iterate over our chunked audio samples
98
  for batch, _ in zip(dataloader, progress.tqdm(dummy_batches, desc="Transcribing...")):
99
  model_outputs.append(
100
- pipeline.forward(batch, batch_size=BATCH_SIZE, task=task, return_timestamps=return_timestamps)
101
  )
102
  runtime = time.time() - start_time
103
 
 
71
 
72
 
73
  if __name__ == "__main__":
74
+ pipeline = FlaxWhisperPipline(checkpoint, dtype=jnp.float16, batch_size=BATCH_SIZE)
75
  stride_length_s = CHUNK_LENGTH_S / 6
76
  chunk_len = round(CHUNK_LENGTH_S * pipeline.feature_extractor.sampling_rate)
77
  stride_left = stride_right = round(stride_length_s * pipeline.feature_extractor.sampling_rate)
 
97
  # iterate over our chunked audio samples
98
  for batch, _ in zip(dataloader, progress.tqdm(dummy_batches, desc="Transcribing...")):
99
  model_outputs.append(
100
+ pipeline.forward(batch, batch_size=BATCH_SIZE, task=task, return_timestamps=return_timestamps, language="chinese")
101
  )
102
  runtime = time.time() - start_time
103