anuragshas commited on
Commit
d84fc0b
1 Parent(s): c7fc93a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -31,7 +31,7 @@ num_to_char = layers.StringLookup(
31
  def decode_batch_predictions(pred):
32
  input_len = np.ones(pred.shape[0]) * pred.shape[1]
33
  # Use greedy search. For complex tasks, you can use beam search
34
- results = keras.backend.ctc_decode(pred, input_length=input_len, greedy=False, beam_width=5)[0][0][
35
  :, :max_length
36
  ]
37
  # Iterate over the results and get back the text
 
31
  def decode_batch_predictions(pred):
32
  input_len = np.ones(pred.shape[0]) * pred.shape[1]
33
  # Use greedy search. For complex tasks, you can use beam search
34
+ results = keras.backend.ctc_decode(pred, input_length=input_len, greedy=True)[0][0][
35
  :, :max_length
36
  ]
37
  # Iterate over the results and get back the text