Downloads · 30 days
0
Abhisingh-18/Rag-Model-For-DA
Rag-Model-For-DA is a machine learning model from Abhisingh-18. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
0
Access
Public
Updated Jul 13, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.jsx73.4 KB · 37%
From the Hugging Face model README
A comprehensive RAG (Retrieval-Augmented Generation) based document analysis system for analyzing disaster management training data. Built for the National Disaster Management Authority (NDMA) as part of Smart India Hackathon 2025.
┌─────────────────┐
│ React Frontend │
│ (Vite + UI) │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Express API │
│ (Node.js) │
└────────┬────────┘
│
┌────┴────┐
▼ ▼
┌────────┐ ┌──────────┐
│MongoDB │ │Gemini AI │
└────────┘ └──────────┘
cd "c:\Users\91979\OneDrive\Desktop\Rag Model"
cd backend
npm install
Edit backend/.env and add your credentials:
GEMINI_API_KEY=your_gemini_api_key_here
MONGODB_URI=mongodb://localhost:27017/rag-document-analysis
cd ../frontend
npm install
mongod
cd backend
npm run dev
Backend will run on http://localhost:5000
cd frontend
npm run dev
Frontend will run on http://localhost:5173
http://localhost:5173Rag Model/
├── backend/
│ ├── models/
│ │ └── Document.js # MongoDB schema
│ ├── routes/
│ │ ├── upload.js # Upload endpoints
│ │ └── analysis.js # Analysis endpoints
│ ├── services/
│ │ ├── documentParser.js # PDF/Excel/CSV parser
│ │ ├── ragEngine.js # RAG implementation
│ │ ├── analysisService.js # AI analysis logic
│ │ └── reportGenerator.js # PDF report generation
│ ├── server.js # Express server
│ └── package.json
│
├── frontend/
│ ├── src/
│ │ ├── components/
│ │ │ ├── FileUpload.jsx # Upload component
│ │ │ ├── AnalysisDashboard.jsx # Dashboard
│ │ │ └── ReportPreview.jsx # Report preview
│ │ ├── App.jsx # Main app
│ │ ├── main.jsx # Entry point
│ │ └── index.css # Styles
│ ├── index.html
│ ├── vite.config.js
│ └── package.json
│
└── README.md
POST /api/upload - Upload and analyze documentGET /api/upload/documents - Get all documentsGET /api/upload/document/:id - Get specific documentDELETE /api/upload/document/:id - Delete documentPOST /api/analysis/ask - Ask question about document (RAG)GET /api/analysis/report/:filename - Download reportGET /api/analysis/stats - Get aggregate statisticsBackend:
Frontend:
Training ID,Date,Location,State,Theme,Participants,Trainer,Duration,Completion Rate
TR001,2024-01-15,Delhi,Delhi,Earthquake,50,Dr. Sharma,2 days,95%
TR002,2024-01-20,Mumbai,Maharashtra,Flood,75,Mr. Patel,3 days,88%
{
"totalTrainings": 150,
"totalParticipants": 5000,
"themeDistribution": {
"Earthquake": 40,
"Flood": 60,
"Cyclone": 30
},
"stateWiseCoverage": {
"Delhi": 20,
"Maharashtra": 35
},
"averageCompletionRate": "91%",
"gapAnalysis": {
"underservedStates": ["Nagaland", "Mizoram"],
"underservedThemes": ["Tsunami"]
},
"recommendations": [...]
}
| Variable | Description | Required |
|---|---|---|
GEMINI_API_KEY | Google Gemini API key | Yes |
MONGODB_URI | MongoDB connection string | Yes |
PORT | Backend server port | No (default: 5000) |
CLIENT_URL | Frontend URL for CORS | No (default: http://localhost:5173) |
This project was developed for Smart India Hackathon 2025 by Team JARVIS GGV.
MIT License - Feel free to use for educational and government purposes.
Smart India Hackathon 2025
Problem Statement ID: SIH25258
Theme: Disaster Management
For Official Use by NDMA, Government of India