pavansuresh commited on
Commit
06c0907
·
verified ·
1 Parent(s): b49a669

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from shadow_map import analyze_uv_exposure
3
+ import tempfile
4
+
5
+ st.title("UV Sterilization Verifier")
6
+
7
+ img = st.file_uploader("Upload Post-Sterilization Image", type=["jpg", "png"])
8
+ if img:
9
+ with tempfile.NamedTemporaryFile(delete=False, suffix=".jpg") as f:
10
+ f.write(img.read())
11
+ f.flush()
12
+ coverage, preview = analyze_uv_exposure(f.name)
13
+
14
+ st.image(preview, caption=f"Coverage: {coverage}%")
15
+ st.success("Compliant") if coverage >= 95 else st.error("Fail - Insufficient Exposure")