Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -8,6 +8,7 @@ from ultralytics import YOLO
|
|
8 |
import time
|
9 |
import numpy as np
|
10 |
import imageio_ffmpeg as ffmpeg
|
|
|
11 |
|
12 |
# Page config first
|
13 |
st.set_page_config(
|
@@ -58,9 +59,11 @@ Early wildfire detection using YOLOv8 AI vision model. See examples below or upl
|
|
58 |
""")
|
59 |
|
60 |
# Function to create synchronized video pair HTML
|
61 |
-
def create_synced_video_pair(
|
62 |
-
|
63 |
-
|
|
|
|
|
64 |
html = f"""
|
65 |
<div style="display: flex; justify-content: space-between;">
|
66 |
<div style="width: 48%;">
|
|
|
8 |
import time
|
9 |
import numpy as np
|
10 |
import imageio_ffmpeg as ffmpeg
|
11 |
+
import base64
|
12 |
|
13 |
# Page config first
|
14 |
st.set_page_config(
|
|
|
59 |
""")
|
60 |
|
61 |
# Function to create synchronized video pair HTML
|
62 |
+
def create_synced_video_pair(orig_url, proc_url, pair_id):
|
63 |
+
orig_bytes = requests.get(orig_url).content
|
64 |
+
proc_bytes = requests.get(proc_url).content
|
65 |
+
orig_b64 = base64.b64encode(orig_bytes).decode('utf-8')
|
66 |
+
proc_b64 = base64.b64encode(proc_bytes).decode('utf-8')
|
67 |
html = f"""
|
68 |
<div style="display: flex; justify-content: space-between;">
|
69 |
<div style="width: 48%;">
|