Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -33,6 +33,8 @@ model_path = hf_hub_download(repo_id="kobrasoft/kobraspeech-rnn-cs", filename="k
|
|
33 |
with tf.keras.utils.custom_object_scope({'CTCLoss': CTCLoss}):
|
34 |
model = tf.keras.models.load_model(model_path)
|
35 |
|
|
|
|
|
36 |
num_to_char_path = hf_hub_download(repo_id="kobrasoft/kobraspeech-rnn-cs", filename="num_to_char.json")
|
37 |
with open(num_to_char_path, "rb") as f:
|
38 |
num_to_char = tf.keras.layers.StringLookup(vocabulary=pkl.load(f), oov_token="", invert=True)
|
|
|
33 |
with tf.keras.utils.custom_object_scope({'CTCLoss': CTCLoss}):
|
34 |
model = tf.keras.models.load_model(model_path)
|
35 |
|
36 |
+
import pickle as pkl
|
37 |
+
|
38 |
num_to_char_path = hf_hub_download(repo_id="kobrasoft/kobraspeech-rnn-cs", filename="num_to_char.json")
|
39 |
with open(num_to_char_path, "rb") as f:
|
40 |
num_to_char = tf.keras.layers.StringLookup(vocabulary=pkl.load(f), oov_token="", invert=True)
|