tstone87 commited on
Commit
d75eede
·
verified ·
1 Parent(s): 93f512e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
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(orig_data, proc_data, pair_id):
62
- orig_b64 = requests.get(orig_data).content.encode('base64').decode()
63
- proc_b64 = requests.get(proc_data).content.encode('base64').decode()
 
 
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%;">