Spaces:
Running
Running
abrar-adnan
commited on
Commit
•
c8aa6df
1
Parent(s):
483d410
Update app.py
Browse files
app.py
CHANGED
@@ -50,7 +50,12 @@ def video_processing(video):
|
|
50 |
elif(result[0] == 'off_camera'): off_camera = off_camera + 1
|
51 |
total = total + 1
|
52 |
|
53 |
-
|
|
|
|
|
|
|
|
|
|
|
54 |
# print(total,on_camera,off_camera)
|
55 |
# print(f'focus perfectage = {on_camera/total*100}')
|
56 |
# Release the video capture object and close all windows
|
|
|
50 |
elif(result[0] == 'off_camera'): off_camera = off_camera + 1
|
51 |
total = total + 1
|
52 |
|
53 |
+
try:
|
54 |
+
# your processing code here
|
55 |
+
gaze_percentage = on_camera / total * 100
|
56 |
+
except Exception as e:
|
57 |
+
print(f"An error occurred while processing the video: {e}")
|
58 |
+
gaze_percentage = '000'
|
59 |
# print(total,on_camera,off_camera)
|
60 |
# print(f'focus perfectage = {on_camera/total*100}')
|
61 |
# Release the video capture object and close all windows
|