DSatishchandra commited on
Commit
5b7a8fd
·
verified ·
1 Parent(s): 959dce1

Update modules/streamlit_ui.py

Browse files
Files changed (1) hide show
  1. modules/streamlit_ui.py +8 -2
modules/streamlit_ui.py CHANGED
@@ -1,10 +1,16 @@
1
  import streamlit as st
2
- import cv2
3
 
4
  def display_video_feed():
5
- cap = cv2.VideoCapture("thermal_video_feed.mp4") # Replace with live feed
 
 
6
  ret, frame = cap.read()
7
  if ret:
8
  st.image(frame, channels="BGR", caption="Live Feed", use_column_width=True)
9
  cap.release()
10
  return frame
 
 
 
 
 
 
1
  import streamlit as st
 
2
 
3
  def display_video_feed():
4
+ # Example code to capture a frame from a video feed (replace with your feed)
5
+ import cv2
6
+ cap = cv2.VideoCapture("thermal_video_feed.mp4") # Replace with live feed URL or file
7
  ret, frame = cap.read()
8
  if ret:
9
  st.image(frame, channels="BGR", caption="Live Feed", use_column_width=True)
10
  cap.release()
11
  return frame
12
+
13
+ def display_alerts(faults):
14
+ """ Function to display alerts in Streamlit """
15
+ for fault in faults:
16
+ st.warning(f"ALERT: {fault}")