mlhubber / mlhub

Machine Learning Model Repository Hub Command Line Tool.
MIT License
20 stars 11 forks source link

get_private() to take parameters #239

Closed gjwgit closed 3 years ago

gjwgit commented 3 years ago

Each util.py in the various az and bing provides request_priv_info() which is essentially the same except for the parameters unique to each package.

Those parameters should come from the MLHUB.yaml and the private.json files instead of having to hard code them into the function. I should be able to do

key, endpoint = get_private() # for azspeech commands key = get_private() # for bing

If there are multiple keys, then, for pyspeech might need to do:

google_key = get_private("Google Speech") azure_key, azure_location = get_private("Azure Speech")

JingjingShii commented 3 years ago

In MLHUB.yaml: private: Azure Speech:key*, location key, location = get_private("private.json", "azlang", "Azure Speech")

The order of get_private() output is the same as the order in private row in MLHUB.yaml