-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflask_app.py
65 lines (46 loc) · 1.47 KB
/
flask_app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
from flask import request, Flask
import Meraki_AWS_Script
import credentials
import get_face_data
import run_webex_capture
import emotion_graph
import aggregate_totals
import fatigue_graph
flask_app = Flask(__name__)
merakiDetectedText = "Loading..."
@flask_app.route("/detect-text-retrieve", methods=["GET"])
def detect_text_retrieve():
global merakiDetectedText
return merakiDetectedText
@flask_app.route("/detect-text-analyze", methods=["GET"])
def detect_text_analyze():
Meraki_AWS_Script.snapshot_meraki_camera()
global merakiDetectedText
merakiDetectedText = Meraki_AWS_Script.detect_text()
return ("", 204)
@flask_app.route("/face-data", methods=["GET"])
def face_data():
face_data = get_face_data.face_data()
return face_data
@flask_app.route("/run-webex-capture", methods=["GET"])
def run_webex_captures():
run_webex_capture.run_webex_capture()
return ("", 204)
@flask_app.route("/emotion-graph", methods=["GET"])
def emotions_graph():
result = emotion_graph.emotion_graph()
return result
@flask_app.route("/fatigue-graph", methods=["GET"])
def fatigues_graph():
result = fatigue_graph.fatigue_graph()
return result
@flask_app.route("/aggregate-totals", methods=["GET"])
def aggregete_total():
result = aggregate_totals.aggregate_totals()
return result
if __name__ == "__main__":
flask_app.run(
host=credentials.FLASK["Flask_HOST"],
port=credentials.FLASK["Flask_PORT"],
debug=False,
)