| Conditions | 5 |
| Total Lines | 24 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import pip |
||
| 24 | def main(): |
||
| 25 | install_dependencies(["sklearn", "pandas", "numpy", "textblob", "nltk", "scipy"]) |
||
| 26 | print("==================================================================") |
||
| 27 | # Determine if we run python or python3 |
||
| 28 | if platform.system() == "Windows": |
||
| 29 | py = "python" |
||
| 30 | else: |
||
| 31 | py = "python3" |
||
| 32 | |||
| 33 | if len(sys.argv) > 1: |
||
| 34 | config_file_path = sys.argv[1] |
||
| 35 | else: |
||
| 36 | config_file_path = setup_utils.get_default_config_file_path() |
||
| 37 | print(f"Using config file at {config_file_path}") |
||
| 38 | port, auth_on, prefix = setup_utils.parse_config(config_file_path) |
||
| 39 | if auth_on: |
||
| 40 | auth_args = setup_utils.get_creds() |
||
| 41 | else: |
||
| 42 | auth_args = [] |
||
| 43 | |||
| 44 | directory = str(Path(__file__).resolve().parent / "scripts") |
||
| 45 | # Deploy each model in the scripts directory |
||
| 46 | for filename in os.listdir(directory): |
||
| 47 | subprocess.run([py, f"{directory}/{filename}", config_file_path] + auth_args) |
||
| 48 | |||
| 52 |