Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -95,10 +95,10 @@ def process_image(uploaded_file):
|
|
95 |
# Define the function to process the video
|
96 |
def process_video_and_save(uploaded_file):
|
97 |
# Path for Arabic font
|
98 |
-
font_path = "
|
99 |
|
100 |
# Paths for saving violation images
|
101 |
-
violation_image_path = '
|
102 |
|
103 |
# Track emails already sent to avoid duplicate emails
|
104 |
sent_emails = {}
|
@@ -107,8 +107,8 @@ def process_video_and_save(uploaded_file):
|
|
107 |
violations_dict = {}
|
108 |
|
109 |
# Paths for saving violation images and videos
|
110 |
-
video_path = "
|
111 |
-
output_video_path = '
|
112 |
|
113 |
# Save the uploaded video file to this path
|
114 |
with open(video_path, "wb") as f:
|
|
|
95 |
# Define the function to process the video
|
96 |
def process_video_and_save(uploaded_file):
|
97 |
# Path for Arabic font
|
98 |
+
font_path = "alfont_com_arial-1.ttf"
|
99 |
|
100 |
# Paths for saving violation images
|
101 |
+
violation_image_path = 'violation.jpg'
|
102 |
|
103 |
# Track emails already sent to avoid duplicate emails
|
104 |
sent_emails = {}
|
|
|
107 |
violations_dict = {}
|
108 |
|
109 |
# Paths for saving violation images and videos
|
110 |
+
video_path = "uploaded_video.mp4"
|
111 |
+
output_video_path = 'output_violation.mp4'
|
112 |
|
113 |
# Save the uploaded video file to this path
|
114 |
with open(video_path, "wb") as f:
|