-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated config.py, model.py, server.py and translator.py
config.py: - Removed TOKENIZERS_PATH. model.py: - __init__ now expect a fourth parameter, model_path. - _model_path is now set to p_model_path. - Removed _tokenizers_path. A model's files are now all in the same folder. - Extracted _load_translator to the Translator class to use polymorphism. - Updated _load to always call _load_translator no matter the type of the model. The specific behavior is implemented in children if needed (See Translator.py) - _load_tokens and _save_tokens now use _model_path. server.py: - Updated handle_request to receive the models path in p_data and to use it in the model constructor. translator.py: - Added _load_model method (extracted from model.py. Old name "_load_translator")
- Loading branch information
1 parent
905aa23
commit 41c4ea0
Showing
4 changed files
with
52 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters