Spaces:
Sleeping
Sleeping
| 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"] |