Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
vardanagarwal
GitHub Repository: vardanagarwal/Proctoring-AI
Path: blob/master/main.py
453 views
1
from fastapi import FastAPI, APIRouter
2
3
4
from eye_tracker import track_eye
5
from head_pose_estimation import detect_head_pose
6
from mouth_opening_detector import mouth_opening_detector
7
from person_and_phone import detect_phone_and_person
8
9
10
app = FastAPI()
11
12
13
@app.post("/analyze_video")
14
def read_root(video_url: str=None):
15
track_eye(video_url)
16
detect_head_pose(video_url)
17
mouth_opening_detector(video_url)
18
detect_phone_and_person(video_url)
19
20
21
return {"message": "Success"}
22
23