-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathauto-docs.py
More file actions
26 lines (18 loc) · 886 Bytes
/
auto-docs.py
File metadata and controls
26 lines (18 loc) · 886 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from formatting import add_documentation_to_file
import click
@click.command()
@click.argument('file_or_directory', type=click.Path(exists=True))
@click.option('-m', '--model', default='large', type=str, required=False)
def main(file_or_directory, model):
models = {
'small': "SEBIS/code_trans_t5_small_code_documentation_generation_python_multitask_finetune",
'medium': "SEBIS/code_trans_t5_base_code_documentation_generation_python_multitask_finetune",
'base': "SEBIS/code_trans_t5_base_code_documentation_generation_python_multitask_finetune",
'large': "SEBIS/code_trans_t5_large_code_documentation_generation_python_multitask_finetune"
}
if models.get(model):
model = models[model]
add_documentation_to_file(file_name=file_or_directory, model_name=model)
print('\nFINISHED\n')
if __name__ == '__main__':
main()