Commit
Β·
03751e1
1
Parent(s):
0e038f6
add
Browse files- Dockerfile +39 -0
- README.md +11 -8
Dockerfile
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Dockerfile for Hugging Face Spaces
|
| 2 |
+
FROM node:18-alpine AS frontend-builder
|
| 3 |
+
|
| 4 |
+
# Build frontend
|
| 5 |
+
WORKDIR /frontend
|
| 6 |
+
COPY frontend/package*.json ./
|
| 7 |
+
RUN npm install
|
| 8 |
+
COPY frontend/ ./
|
| 9 |
+
RUN npm run build
|
| 10 |
+
|
| 11 |
+
# Python backend stage
|
| 12 |
+
FROM python:3.10-slim
|
| 13 |
+
|
| 14 |
+
WORKDIR /app
|
| 15 |
+
|
| 16 |
+
# Install system dependencies
|
| 17 |
+
RUN apt-get update && apt-get install -y \
|
| 18 |
+
build-essential \
|
| 19 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 20 |
+
|
| 21 |
+
# Copy backend requirements and install
|
| 22 |
+
COPY backend/requirements.txt ./
|
| 23 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 24 |
+
|
| 25 |
+
# Copy backend application
|
| 26 |
+
COPY backend/app ./app
|
| 27 |
+
COPY backend/models ./models
|
| 28 |
+
|
| 29 |
+
# Create necessary directories
|
| 30 |
+
RUN mkdir -p ./uploads ./static
|
| 31 |
+
|
| 32 |
+
# Copy built frontend from builder stage
|
| 33 |
+
COPY --from=frontend-builder /frontend/dist ./static
|
| 34 |
+
|
| 35 |
+
# Expose port 7860 (required by Hugging Face Spaces)
|
| 36 |
+
EXPOSE 7860
|
| 37 |
+
|
| 38 |
+
# Run the FastAPI application on port 7860
|
| 39 |
+
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|
README.md
CHANGED
|
@@ -1,9 +1,10 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
colorFrom: blue
|
| 5 |
-
colorTo:
|
| 6 |
sdk: docker
|
|
|
|
| 7 |
pinned: false
|
| 8 |
---
|
| 9 |
|
|
@@ -27,6 +28,10 @@ Deep Learning application for automated brain tumor classification from MRI scan
|
|
| 27 |
|
| 28 |
## π Quick Start
|
| 29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
### Local Development
|
| 31 |
|
| 32 |
1. **Clone the repository**
|
|
@@ -72,11 +77,11 @@ npm run dev
|
|
| 72 |
2. Click "Run Diagnosis"
|
| 73 |
3. View prediction with confidence score
|
| 74 |
|
| 75 |
-
## π Model
|
| 76 |
|
| 77 |
-
- **Accuracy**: [Add your accuracy]
|
| 78 |
- **Classes**: 4 (Glioma, Meningioma, Pituitary, No Tumor)
|
| 79 |
- **Input Size**: 224x224 RGB images
|
|
|
|
| 80 |
|
| 81 |
## π οΈ Technology Stack
|
| 82 |
|
|
@@ -92,11 +97,9 @@ MIT License
|
|
| 92 |
|
| 93 |
## π¨βπ» Author
|
| 94 |
|
| 95 |
-
|
| 96 |
|
| 97 |
## π Acknowledgments
|
| 98 |
|
| 99 |
- Dataset: [Mention your dataset source]
|
| 100 |
- Based on ResidualInceptionBlock architecture
|
| 101 |
-
|
| 102 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: MRI Brain Tumor Detection
|
| 3 |
+
emoji: π§
|
| 4 |
colorFrom: blue
|
| 5 |
+
colorTo: purple
|
| 6 |
sdk: docker
|
| 7 |
+
app_port: 7860
|
| 8 |
pinned: false
|
| 9 |
---
|
| 10 |
|
|
|
|
| 28 |
|
| 29 |
## π Quick Start
|
| 30 |
|
| 31 |
+
### Using the Deployed App
|
| 32 |
+
|
| 33 |
+
Simply visit the app URL and upload an MRI scan image to get instant predictions.
|
| 34 |
+
|
| 35 |
### Local Development
|
| 36 |
|
| 37 |
1. **Clone the repository**
|
|
|
|
| 77 |
2. Click "Run Diagnosis"
|
| 78 |
3. View prediction with confidence score
|
| 79 |
|
| 80 |
+
## π Model Information
|
| 81 |
|
|
|
|
| 82 |
- **Classes**: 4 (Glioma, Meningioma, Pituitary, No Tumor)
|
| 83 |
- **Input Size**: 224x224 RGB images
|
| 84 |
+
- **Architecture**: Custom ResidualInceptionBlock with 50+ layers
|
| 85 |
|
| 86 |
## π οΈ Technology Stack
|
| 87 |
|
|
|
|
| 97 |
|
| 98 |
## π¨βπ» Author
|
| 99 |
|
| 100 |
+
[Your Name]
|
| 101 |
|
| 102 |
## π Acknowledgments
|
| 103 |
|
| 104 |
- Dataset: [Mention your dataset source]
|
| 105 |
- Based on ResidualInceptionBlock architecture
|
|
|
|
|
|