Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,190 +1,21 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
🧠
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
- Email/Password with OTP verification
|
| 12 |
-
- **Professional Onboarding**: Doctor credentials and hospital information
|
| 13 |
-
- **Scan History**: Track and review previous diagnoses
|
| 14 |
-
- **PDF Reports**: Generate detailed medical reports
|
| 15 |
-
- **Secure & Compliant**: Email verification, secure authentication
|
| 16 |
-
|
| 17 |
-
## 🚀 Quick Start
|
| 18 |
-
|
| 19 |
-
### Prerequisites
|
| 20 |
-
|
| 21 |
-
- Python 3.8+
|
| 22 |
-
- pip
|
| 23 |
-
- Virtual environment (recommended)
|
| 24 |
-
|
| 25 |
-
### Installation
|
| 26 |
-
|
| 27 |
-
1. **Clone the repository**
|
| 28 |
-
```bash
|
| 29 |
-
git clone <your-repo-url>
|
| 30 |
-
cd "final year aiml project"
|
| 31 |
-
```
|
| 32 |
-
|
| 33 |
-
2. **Create virtual environment**
|
| 34 |
-
```bash
|
| 35 |
-
python -m venv .venv
|
| 36 |
-
.venv\Scripts\activate # Windows
|
| 37 |
-
# source .venv/bin/activate # Linux/Mac
|
| 38 |
-
```
|
| 39 |
-
|
| 40 |
-
3. **Install dependencies**
|
| 41 |
-
```bash
|
| 42 |
-
pip install -r requirements.txt
|
| 43 |
-
```
|
| 44 |
-
|
| 45 |
-
4. **Set up environment variables**
|
| 46 |
-
Create a `config.py` file with:
|
| 47 |
-
```python
|
| 48 |
-
# Email Configuration
|
| 49 |
-
MAIL_SERVER = 'smtp.gmail.com'
|
| 50 |
-
MAIL_PORT = 587
|
| 51 |
-
MAIL_USERNAME = '[email protected]'
|
| 52 |
-
MAIL_PASSWORD = 'your-app-password'
|
| 53 |
-
|
| 54 |
-
# Google OAuth
|
| 55 |
-
GOOGLE_CLIENT_ID = 'your-client-id'
|
| 56 |
-
GOOGLE_CLIENT_SECRET = 'your-client-secret'
|
| 57 |
-
```
|
| 58 |
-
|
| 59 |
-
5. **Download AI Models**
|
| 60 |
-
Due to file size limitations, AI models are not included in the repository.
|
| 61 |
-
Download from [Google Drive/OneDrive link] and place in project root:
|
| 62 |
-
- `alzhimermodel.pth`
|
| 63 |
-
- `dementia_detection_model_2.h5`
|
| 64 |
-
- `multiple_sclerosis.pth`
|
| 65 |
-
- `stroke.pth`
|
| 66 |
-
|
| 67 |
-
6. **Run the application**
|
| 68 |
-
```bash
|
| 69 |
-
python neurosight_app_with_auth.py
|
| 70 |
-
```
|
| 71 |
-
|
| 72 |
-
7. **Access the application**
|
| 73 |
-
Open your browser and navigate to `http://localhost:5000`
|
| 74 |
-
|
| 75 |
-
## 📁 Project Structure
|
| 76 |
-
|
| 77 |
-
```
|
| 78 |
-
final year aiml project/
|
| 79 |
-
├── neurosight_app_with_auth.py # Main application
|
| 80 |
-
├── models.py # Database models
|
| 81 |
-
├── auth_utils.py # Authentication utilities
|
| 82 |
-
├── requirements.txt # Python dependencies
|
| 83 |
-
├── templates/ # HTML templates
|
| 84 |
-
│ ├── login.html
|
| 85 |
-
│ ├── register.html
|
| 86 |
-
│ ├── verify_email.html
|
| 87 |
-
│ ├── dashboard.html
|
| 88 |
-
│ ├── detect.html
|
| 89 |
-
│ └── ...
|
| 90 |
-
├── static/ # Static assets
|
| 91 |
-
│ ├── css/
|
| 92 |
-
│ ├── js/
|
| 93 |
-
│ └── images/
|
| 94 |
-
└── instance/ # Database files
|
| 95 |
-
```
|
| 96 |
-
|
| 97 |
-
## 🔐 Authentication Flow
|
| 98 |
-
|
| 99 |
-
### Email/Password Registration
|
| 100 |
-
1. User registers with email and password
|
| 101 |
-
2. System sends 6-digit OTP to email
|
| 102 |
-
3. User verifies OTP
|
| 103 |
-
4. User completes onboarding
|
| 104 |
-
5. Access granted to dashboard
|
| 105 |
-
|
| 106 |
-
### Google OAuth
|
| 107 |
-
1. User clicks "Continue with Google"
|
| 108 |
-
2. Google authentication
|
| 109 |
-
3. User completes onboarding (if first time)
|
| 110 |
-
4. Access granted to dashboard
|
| 111 |
-
|
| 112 |
-
## 🧪 Testing
|
| 113 |
-
|
| 114 |
-
### Email System
|
| 115 |
-
```bash
|
| 116 |
-
python test_email.py
|
| 117 |
-
```
|
| 118 |
-
|
| 119 |
-
### Database Management
|
| 120 |
-
```bash
|
| 121 |
-
python db_manager.py
|
| 122 |
-
```
|
| 123 |
-
|
| 124 |
-
## 📧 Email Configuration
|
| 125 |
-
|
| 126 |
-
The application uses Gmail SMTP for sending emails:
|
| 127 |
-
- OTP verification codes
|
| 128 |
-
- Welcome emails
|
| 129 |
-
- Password reset emails
|
| 130 |
-
|
| 131 |
-
**Setup Gmail App Password:**
|
| 132 |
-
1. Enable 2-Factor Authentication on your Google account
|
| 133 |
-
2. Generate an App Password
|
| 134 |
-
3. Use the App Password in `config.py`
|
| 135 |
-
|
| 136 |
-
## 🛠️ Database Management
|
| 137 |
-
|
| 138 |
-
### View Database
|
| 139 |
-
```bash
|
| 140 |
-
python view_db.py
|
| 141 |
-
```
|
| 142 |
-
|
| 143 |
-
### Manage Users
|
| 144 |
-
```bash
|
| 145 |
-
python db_manager.py
|
| 146 |
-
```
|
| 147 |
-
|
| 148 |
-
### Run Migrations
|
| 149 |
-
```bash
|
| 150 |
-
python migrate_otp_fields.py
|
| 151 |
-
```
|
| 152 |
-
|
| 153 |
-
## 🔒 Security Features
|
| 154 |
-
|
| 155 |
-
- ✅ OTP email verification (10-minute expiry)
|
| 156 |
-
- ✅ Password strength validation
|
| 157 |
-
- ✅ Attempt limiting (5 max OTP attempts)
|
| 158 |
-
- ✅ TLS email encryption
|
| 159 |
-
- ✅ Secure session management
|
| 160 |
-
- ✅ Google OAuth integration
|
| 161 |
-
|
| 162 |
-
## 📊 Supported Diseases
|
| 163 |
-
|
| 164 |
-
1. **Alzheimer's Disease**
|
| 165 |
-
2. **Dementia**
|
| 166 |
-
3. **Multiple Sclerosis**
|
| 167 |
-
4. **Stroke**
|
| 168 |
-
|
| 169 |
-
## 🤝 Contributing
|
| 170 |
-
|
| 171 |
-
This is a final year AIML project. For questions or contributions, please contact the project team.
|
| 172 |
-
|
| 173 |
-
## 📄 License
|
| 174 |
-
|
| 175 |
-
See LICENSE file for details.
|
| 176 |
-
|
| 177 |
-
## 👥 Team
|
| 178 |
-
|
| 179 |
-
Final Year AIML Project Team
|
| 180 |
-
|
| 181 |
-
## 📞 Support
|
| 182 |
|
| 183 |
-
|
| 184 |
-
- Check the documentation
|
| 185 |
-
- Review the walkthrough guides
|
| 186 |
-
- Contact the development team
|
| 187 |
|
| 188 |
-
|
| 189 |
|
| 190 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: NeuroSight Brain Disease Detection
|
| 3 |
+
emoji: 🧠
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: indigo
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: "4.0.0"
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: false
|
| 10 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
+
# NeuroSight - AI-Powered Brain Disease Detection
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
+
AI-powered platform for detecting Alzheimer's, Dementia, Multiple Sclerosis, and Stroke.
|
| 15 |
|
| 16 |
+
## Features
|
| 17 |
+
- Email/Password authentication with OTP verification
|
| 18 |
+
- Google OAuth integration
|
| 19 |
+
- AI-powered disease detection
|
| 20 |
+
- Professional PDF reports
|
| 21 |
+
- Scan history tracking
|