trip-fontaine commited on
Commit
ae97053
1 Parent(s): d4e7e8b
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -98,20 +98,21 @@ def transcribe(inputs):
98
  return result
99
 
100
  pipe._forward = _forward_time
 
101
  text = pipe(inputs, batch_size=BATCH_SIZE)["text"]
102
 
103
  yield distil_text, distil_runtime, text, runtime
104
 
105
 
106
- print("Warming up...")
107
- inputs = np.random.randn(30 * pipe.feature_extractor.sampling_rate)
108
- inputs = {"array": inputs, "sampling_rate": pipe.feature_extractor.sampling_rate}
109
 
110
- for _ in range(N_WARMUP):
111
- _ = pipe_forward(inputs.copy(), batch_size=BATCH_SIZE)["text"]
112
- _ = distil_pipe_forward(inputs.copy(), batch_size=BATCH_SIZE)["text"]
113
- print(_)
114
- print("Models warmed up!")
115
 
116
 
117
 
 
98
  return result
99
 
100
  pipe._forward = _forward_time
101
+ print(inputs)
102
  text = pipe(inputs, batch_size=BATCH_SIZE)["text"]
103
 
104
  yield distil_text, distil_runtime, text, runtime
105
 
106
 
107
+ # print("Warming up...")
108
+ # inputs = np.random.randn(30 * pipe.feature_extractor.sampling_rate)
109
+ # inputs = {"array": inputs, "sampling_rate": pipe.feature_extractor.sampling_rate}
110
 
111
+ # for _ in range(N_WARMUP):
112
+ # _ = pipe_forward(inputs.copy(), batch_size=BATCH_SIZE)["text"]
113
+ # _ = distil_pipe_forward(inputs.copy(), batch_size=BATCH_SIZE)["text"]
114
+ # print(_)
115
+ # print("Models warmed up!")
116
 
117
 
118