File size: 1,972 Bytes
ed89c53
df9d6e6
ed89c53
 
 
 
77c3f4a
ed89c53
df9d6e6
ed89c53
 
df9d6e6
ed89c53
 
2396173
ed89c53
2396173
ed89c53
2396173
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77c3f4a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
title: Stroke Classification
emoji: πŸš€
colorFrom: red
colorTo: red
sdk: docker
app_port: 7860
tags:
- streamlit
pinned: false
short_description: Streamlit template space
license: apache-2.0
---

# 🧠 Stroke Classification System

**Status**: Dependency-conflict-free Streamlit app for stroke classification.

## πŸš€ Features

- **Clean Dependencies**: No version conflicts
- **System Status Check**: Visual indicators for all components
- **Fast Loading**: Optimized for Hugging Face Spaces
- **Error Handling**: Graceful fallbacks for missing dependencies
- **Medical Interface**: Professional design

## πŸ“‹ Usage

1. Upload your `.h5` model file to the Files tab
2. Click "Load Model" in the app
3. Upload brain scan images for classification
4. View results with confidence scores

## πŸ”§ Technical

- **Framework**: Streamlit (conflict-free)
- **ML**: TensorFlow 2.13.0 with pinned dependencies
- **Visualization**: Matplotlib-based heatmaps
- **Deployment**: Optimized for HF Spaces

---

**Version**: Dependency-conflict-free release
```

And here's your updated Dockerfile to match the port:

```dockerfile type="code" file="Dockerfile"
FROM python:3.9-slim

WORKDIR /app

# Set environment variables for Streamlit
ENV HOME=/tmp
ENV STREAMLIT_SERVER_HEADLESS=true
ENV STREAMLIT_SERVER_ENABLE_CORS=false
ENV STREAMLIT_SERVER_ENABLE_XSRF_PROTECTION=false
ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
ENV STREAMLIT_GLOBAL_DEVELOPMENT_MODE=false

RUN apt-get update && apt-get install -y \
    build-essential \
    curl \
    software-properties-common \
    git \
    && rm -rf /var/lib/apt/lists/*

COPY requirements.txt ./
COPY src/ ./src/

RUN pip3 install -r requirements.txt

# Create streamlit config directory in the temporary home
RUN mkdir -p /tmp/.streamlit

EXPOSE 7860

HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health

ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=7860", "--server.address=0.0.0.0"]