Ryonaly commited on
Commit
815685d
·
verified ·
1 Parent(s): ec8212e

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -37
app.py DELETED
@@ -1,37 +0,0 @@
1
- import streamlit as st
2
- from utils import analyze_image
3
- from PIL import Image
4
-
5
- st.set_page_config(page_title="LUS AI App", layout="wide")
6
- st.title("🫁 Lung Ultrasound (LUS) AI Analysis")
7
-
8
- st.markdown("""
9
- Upload 1–6 lung ultrasound images (JPG/PNG).
10
- This app uses **two real Hugging Face models** to:
11
- - Count **B-lines**
12
- - Detect **consolidation**
13
- - Calculate a **final LUS Score (0–3)** per image
14
-
15
- 🧪 This is a real AI inference app — not a demo.
16
- """)
17
-
18
- uploaded_files = st.file_uploader("Upload Lung Ultrasound Images", type=["jpg", "jpeg", "png"], accept_multiple_files=True)
19
-
20
- if uploaded_files:
21
- for idx, uploaded_file in enumerate(uploaded_files):
22
- st.markdown(f"---\n### 🖼️ Image {idx + 1}: `{uploaded_file.name}`")
23
- image = Image.open(uploaded_file).convert("RGB")
24
- st.image(image, width=300)
25
-
26
- # Run real inference
27
- result = analyze_image(image)
28
-
29
- # Display outputs
30
- st.markdown("#### 🔍 B-line Analysis")
31
- st.info(f"**Count**: {result['bline_count']}\n**Label**: {result['bline_label']}")
32
-
33
- st.markdown("#### 🫁 Consolidation Analysis")
34
- st.success(f"{result['consolidation_label']}")
35
-
36
- st.markdown("#### 🧮 Final LUS Score")
37
- st.warning(f"**Score: {result['lus_score']}** — {result['lus_interpretation']}")