Commit
·
93e0d72
1
Parent(s):
4bb590e
Update app.py
Browse files
app.py
CHANGED
@@ -8,6 +8,20 @@ from utils import *
|
|
8 |
|
9 |
api = HfApi()
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
def get_user_models(hf_username, env_tag, lib_tag):
|
12 |
"""
|
13 |
List the Reinforcement Learning models
|
|
|
8 |
|
9 |
api = HfApi()
|
10 |
|
11 |
+
|
12 |
+
import mailchimp_transactional as MailchimpTransactional
|
13 |
+
from mailchimp_transactional.api_client import ApiClientError
|
14 |
+
|
15 |
+
def run():
|
16 |
+
try:
|
17 |
+
mailchimp = MailchimpTransactional.Client(os.environ.get('MAILCHIMP_API_KEY'))
|
18 |
+
response = mailchimp.users.ping()
|
19 |
+
print('API called successfully: {}'.format(response))
|
20 |
+
except ApiClientError as error:
|
21 |
+
print('An exception occurred: {}'.format(error.text))
|
22 |
+
|
23 |
+
run()
|
24 |
+
|
25 |
def get_user_models(hf_username, env_tag, lib_tag):
|
26 |
"""
|
27 |
List the Reinforcement Learning models
|