forked from Tian312/EliIE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclient.py
22 lines (20 loc) · 1011 Bytes
/
client.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import requests
import json
import os
from requests.auth import HTTPBasicAuth
secret = os.getenv('FLASK_SECRET')
user = os.getenv('FLASK_USER')
data = """
Age 70 years or older.
Must have a clinical diagnosis of Alzheimer's Disease.
Life expectancy less than 1 year.
Subjects must be in reasonably good health, based on medical history, physical examination, vital signs, and ECG.
Subjects with a past or current history of seizures cannot participate.
Subjects with clinically significant heart disease, pulmonary disease, diabetes, neurologic or psychiatric disease (Group 1 subjects must have Alzheimer's Disease), or any other illness that could interfere with interpretation of study results.
Current use of donepezil, rivastigmine or galantamine.
GDS-5 score < 6.
Within the previous 2 years, unstable and clinically siginificant cardivascular disease.
"""
url = 'http://192.168.99.100:5000/eliie'
r = requests.post(url, data={'data': data}, auth=requests.auth.HTTPBasicAuth(user, secret))
print r.text