Exemple #1
0
def processs3():
    companyId = request.args.get("companyId")
    participantId = request.args.get("participantId")
    campaignId = request.args.get("campaignId")
    data = getImages(companyId, campaignId, participantId)
    if(companyId is None or participantId is None or campaignId is None):
        return "Invocation is http://hostname:8000?s3?companyId=demo&campaignId=HJ8rdPEjl&[email protected]"
    else:
        data['participantId'] = participantId
        data['companyId'] = companyId
        data['campaignId'] = campaignId
        response = get_emotion(nets, data, companyId, participantId, campaignId)
        return response
Exemple #2
0
        scaleFactor=1.1,
        minNeighbors=15,
        minSize=(70, 70)
    )'''


if __name__=="__main__":
    args = cgi.FieldStorage()
    action = None
    fileId = None
    if args.has_key("companyId"):
        companyId = args["companyId"].value
    if args.has_key("participantId"):
        participantId = args["participantId"].value
    if args.has_key("campaignId"):
        campaignId = args["campaignId"].value

    data = getImages(companyId, campaignId, participantId)
    data['participantId'] = participantId
    data['companyId'] = companyId
    data['campaignId'] = campaignId
    response = get_emotion(data, companyId, participantId, campaignId)
    saveToDB(response)
    print ('''Content-type: text/html

       ''')
    print ("done!")