Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -28,14 +28,14 @@ with st.sidebar:
|
|
28 |
st.header("IMAGE/VIDEO UPLOAD")
|
29 |
source_file = st.file_uploader(
|
30 |
"Choose an image or video...", type=("jpg", "jpeg", "png", "bmp", "webp", "mp4"))
|
31 |
-
confidence = float(st.slider("Select Model Confidence",
|
32 |
video_option = st.selectbox(
|
33 |
"Select Video Shortening Option",
|
34 |
["Original FPS", "1 fps", "1 frame per 5 seconds", "1 frame per 10 seconds", "1 frame per 15 seconds"]
|
35 |
)
|
36 |
|
37 |
# Main page header and introduction images
|
38 |
-
st.title("
|
39 |
col1, col2 = st.columns(2)
|
40 |
with col1:
|
41 |
st.image("https://huggingface.co/spaces/tstone87/ccr-colorado/resolve/main/Fire_1.jpeg", use_column_width=True)
|
@@ -43,7 +43,7 @@ with col2:
|
|
43 |
st.image("https://huggingface.co/spaces/tstone87/ccr-colorado/resolve/main/Fire_3.png", use_column_width=True)
|
44 |
|
45 |
st.markdown("""
|
46 |
-
Fires in Colorado present a serious challenge, threatening urban communities, highways, and even remote areas. Early detection is critical to mitigating risks.
|
47 |
""")
|
48 |
st.markdown("---")
|
49 |
st.header("Fire Detection:")
|
@@ -67,7 +67,7 @@ except Exception as ex:
|
|
67 |
st.error(f"Unable to load model. Check the specified path: {model_path}")
|
68 |
st.error(ex)
|
69 |
|
70 |
-
if st.sidebar.button("Let's Detect
|
71 |
if not source_file:
|
72 |
st.warning("No file uploaded!")
|
73 |
elif source_file.type.split('/')[0] == 'image':
|
|
|
28 |
st.header("IMAGE/VIDEO UPLOAD")
|
29 |
source_file = st.file_uploader(
|
30 |
"Choose an image or video...", type=("jpg", "jpeg", "png", "bmp", "webp", "mp4"))
|
31 |
+
confidence = float(st.slider("Select Model Confidence", 20, 100, 30)) / 100
|
32 |
video_option = st.selectbox(
|
33 |
"Select Video Shortening Option",
|
34 |
["Original FPS", "1 fps", "1 frame per 5 seconds", "1 frame per 10 seconds", "1 frame per 15 seconds"]
|
35 |
)
|
36 |
|
37 |
# Main page header and introduction images
|
38 |
+
st.title("Fire Watch: Detecting fire or smoke using AI vision models")
|
39 |
col1, col2 = st.columns(2)
|
40 |
with col1:
|
41 |
st.image("https://huggingface.co/spaces/tstone87/ccr-colorado/resolve/main/Fire_1.jpeg", use_column_width=True)
|
|
|
43 |
st.image("https://huggingface.co/spaces/tstone87/ccr-colorado/resolve/main/Fire_3.png", use_column_width=True)
|
44 |
|
45 |
st.markdown("""
|
46 |
+
Fires in Colorado present a serious challenge, threatening urban communities, highways, and even remote, unpopulated areas. Unexpected ncidents like lightning strike brushes fires can cause significant property damage, environmental degradation, and even loss of life. Early detection is critical to mitigating these risks. The idea for, Fire Watch, leverages a vision model called YOLOv8 for real-time detection of fires and smoke in images and videos, ensuring rapid response across Colorado’s diverse landscapes.
|
47 |
""")
|
48 |
st.markdown("---")
|
49 |
st.header("Fire Detection:")
|
|
|
67 |
st.error(f"Unable to load model. Check the specified path: {model_path}")
|
68 |
st.error(ex)
|
69 |
|
70 |
+
if st.sidebar.button("Let's Detect fire"):
|
71 |
if not source_file:
|
72 |
st.warning("No file uploaded!")
|
73 |
elif source_file.type.split('/')[0] == 'image':
|