sanchit-gandhi HF staff commited on
Commit
29e688f
1 Parent(s): 2ad1599

fix lang/task

Browse files
Files changed (1) hide show
  1. app.py +1 -7
app.py CHANGED
@@ -39,8 +39,6 @@ pipe = pipeline(
39
  chunk_length_s=30,
40
  torch_dtype=torch_dtype,
41
  device=device,
42
- language="en",
43
- task="transcribe",
44
  )
45
  pipe_forward = pipe._forward
46
 
@@ -53,8 +51,6 @@ distil_pipe = pipeline(
53
  chunk_length_s=15,
54
  torch_dtype=torch_dtype,
55
  device=device,
56
- language="en",
57
- task="transcribe",
58
  )
59
  distil_pipe_forward = distil_pipe._forward
60
 
@@ -81,9 +77,7 @@ def transcribe(inputs):
81
  return result
82
 
83
  pipe._forward = _forward_time
84
- text = pipe(inputs, batch_size=BATCH_SIZE)["text"]
85
-
86
- relative_latency = runtime / distil_runtime
87
 
88
  # Create figure and axis
89
  fig, ax = plt.subplots(figsize=(5, 5))
 
39
  chunk_length_s=30,
40
  torch_dtype=torch_dtype,
41
  device=device,
 
 
42
  )
43
  pipe_forward = pipe._forward
44
 
 
51
  chunk_length_s=15,
52
  torch_dtype=torch_dtype,
53
  device=device,
 
 
54
  )
55
  distil_pipe_forward = distil_pipe._forward
56
 
 
77
  return result
78
 
79
  pipe._forward = _forward_time
80
+ text = pipe(inputs, batch_size=BATCH_SIZE, language="en", task="transcribe")["text"]
 
 
81
 
82
  # Create figure and axis
83
  fig, ax = plt.subplots(figsize=(5, 5))