gilesitorr commited on
Commit
69c01b7
·
1 Parent(s): a16eba0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -144,8 +144,13 @@ model = get_model(
144
  use_same_embed = False,
145
  )
146
 
 
 
147
  path_model = 'https://huggingface.co/spaces/gilesitorr/Nahuatl2Spanish/raw/main/Models/'
148
  filename = path_model+'uncased_translator_nahuatl2espanol+hybrid.h5'
 
 
 
149
  model.load_weights(filename)
150
 
151
  values = list("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ")
 
144
  use_same_embed = False,
145
  )
146
 
147
+ from keras.utils.data_utils import get_file
148
+
149
  path_model = 'https://huggingface.co/spaces/gilesitorr/Nahuatl2Spanish/raw/main/Models/'
150
  filename = path_model+'uncased_translator_nahuatl2espanol+hybrid.h5'
151
+ weights_path = get_file(
152
+ 'model',
153
+ filename)
154
  model.load_weights(filename)
155
 
156
  values = list("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ")