Created
April 26, 2021 08:46
-
-
Save licsber/66e803884dfdb97e3cc8d8aef42c9a51 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| import aip | |
| APP_ID = '1' | |
| API_KEY = '2' | |
| SECRET_KEY = '3' | |
| def run_all(c, start=0): | |
| dirs = dir(c) | |
| print(len(dirs)) | |
| for i in range(start, len(dirs)): | |
| if dirs[i].startswith('_'): | |
| continue | |
| print(i) | |
| try: | |
| res = eval(f"c.{dirs[i]}(test_image)") | |
| print(res) | |
| except Exception as e: | |
| print(e, dirs[i]) | |
| if __name__ == '__main__': | |
| test_image = open('../datasets/Kirito.jpg', 'rb').read() | |
| for i in dir(aip): | |
| if i.startswith('Aip'): | |
| client = eval(f"aip.{i}(APP_ID, API_KEY, SECRET_KEY)") | |
| run_all(client) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://ai.baidu.com/support/news?action=detail&id=2390