]> git.somenet.org - pub/jan/aic18.git/blob - service-analysis/sentiment_analysis.py
rename pdfTest to report.pdf
[pub/jan/aic18.git] / service-analysis / sentiment_analysis.py
1 # -*- coding: utf-8 -*-
2 import json
3 import indicoio
4
5 from analysis import Analysis
6 from offline_analysis import Offline_Analysis
7 from health_check import Health_Check
8
9 from flask import Flask
10 from flask_restful import Api
11
12 app = Flask(__name__)
13 api = Api(app)
14
15 with open('indico_api_key.txt', 'r') as key:
16         indicoio.config.api_key = key.read().replace('\n','')
17
18 api.add_resource(Analysis, '/')
19 api.add_resource(Offline_Analysis, '/offline_analysis')
20 api.add_resource(Health_Check, '/health')
21
22 if __name__ == '__main__':
23         app.run(host="0.0.0.0", port=8081, debug=False)