arghadip2002 commited on
Commit
03751e1
Β·
1 Parent(s): 0e038f6
Files changed (2) hide show
  1. Dockerfile +39 -0
  2. 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: Mri App
3
- emoji: πŸ‘€
4
  colorFrom: blue
5
- colorTo: indigo
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 Performance
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
- Arghadip Biswas
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