Upload folder using huggingface_hub
Browse files
app.py
CHANGED
@@ -566,11 +566,11 @@ def load_model_and_tokenizers():
|
|
566 |
# Use the actual vocab sizes and hparams from the loaded config
|
567 |
model = SmilesIupacLitModule.load_from_checkpoint(
|
568 |
checkpoint_path,
|
569 |
-
src_vocab_size=config["
|
570 |
-
tgt_vocab_size=config["
|
571 |
hparams_dict=config, # Pass the loaded config as hparams
|
572 |
map_location=device, # Map model to the chosen device (CPU or CUDA)
|
573 |
-
strict=False, # Be less strict about matching keys, useful for PTL versions or minor changes
|
574 |
)
|
575 |
|
576 |
# Ensure model is on the correct device, in eval mode, and frozen
|
|
|
566 |
# Use the actual vocab sizes and hparams from the loaded config
|
567 |
model = SmilesIupacLitModule.load_from_checkpoint(
|
568 |
checkpoint_path,
|
569 |
+
src_vocab_size=config["src_vocab_size"],
|
570 |
+
tgt_vocab_size=config["tgt_vocab_size"],
|
571 |
hparams_dict=config, # Pass the loaded config as hparams
|
572 |
map_location=device, # Map model to the chosen device (CPU or CUDA)
|
573 |
+
# strict=False, # Be less strict about matching keys, useful for PTL versions or minor changes
|
574 |
)
|
575 |
|
576 |
# Ensure model is on the correct device, in eval mode, and frozen
|