File size: 966 Bytes
099d157
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import sys
import os
import traceback

with open("win_debug.log", "w") as f:
    f.write("1 - Start\n")
    f.flush()

try:
    with open("win_debug.log", "a") as f: f.write("2 - Imports...\n"); f.flush()
    import numpy as np
    
    with open("win_debug.log", "a") as f: f.write("3 - Importing Face Model...\n"); f.flush()
    sys.path.append("c:/Users/Vasanth kumar/OneDrive/Desktop/new_clg_project/backend")
    from models.face_model import predict_emotion
    
    with open("win_debug.log", "a") as f: f.write("4 - Generating Zero Frame...\n"); f.flush()
    frame = np.zeros((480, 640, 3), dtype=np.uint8)
    
    with open("win_debug.log", "a") as f: f.write("5 - Executing predict_emotion...\n"); f.flush()
    res = predict_emotion(frame, [])
    
    with open("win_debug.log", "a") as f: f.write(f"6 - Done: {res}\n"); f.flush()
except Exception as e:
    with open("win_debug.log", "a") as f: f.write("ERROR!\n" + traceback.format_exc()); f.flush()