Spaces:
Runtime error
Runtime error
| # ============================================================================= | |
| # RAG Chatbot with Vector Database - Requirements | |
| # ============================================================================= | |
| # Production-ready dependencies for medical document analysis and Q&A | |
| # Core ML/AI Framework | |
| torch>=2.0.0 # PyTorch for model inference | |
| transformers>=4.30.0 # Hugging Face transformers | |
| huggingface_hub>=0.20.0 # Hugging Face Hub API (for Inference API) | |
| accelerate>=0.20.0 # Model loading optimization | |
| safetensors>=0.3.0 # Safe model loading | |
| # Vector Database & Embeddings | |
| chromadb>=0.4.0 # Vector database for fast retrieval | |
| sentence-transformers>=2.2.0 # Semantic embeddings (all-MiniLM-L6-v2) | |
| # Data Processing | |
| pandas>=1.3.0 # Data manipulation and CSV handling | |
| numpy>=1.21.0 # Numerical computing | |
| scikit-learn>=1.0.0 # ML utilities and TF-IDF | |
| # Text Analysis & Readability | |
| textstat>=0.7.0 # Flesch-Kincaid Grade Level calculation | |
| nltk>=3.8.0 # Natural language processing utilities | |
| # Document Processing (Core) | |
| pypdf>=3.0.0 # PDF document parsing | |
| python-docx>=0.8.11 # DOCX document parsing | |
| # Optional Document Processing | |
| rank-bm25>=0.2.2 # BM25 retrieval algorithm (alternative to TF-IDF) | |
| # Utilities & Progress | |
| tqdm>=4.65.0 # Progress bars | |
| pathlib2>=2.3.0 # Enhanced path handling (if needed) | |
| # Web Interface | |
| gradio==4.44.1 # Gradio web interface for chatbot (updated for Spaces compatibility) | |
| # Development & Testing (Optional) | |
| pytest>=7.0.0 # Testing framework | |
| black>=22.0.0 # Code formatting | |
| flake8>=4.0.0 # Code linting | |
| # Performance Monitoring (Optional) | |
| psutil>=5.8.0 # System resource monitoring | |
| memory-profiler>=0.60.0 # Memory usage profiling | |
| # ============================================================================= | |
| # Installation Notes: | |
| # ============================================================================= | |
| # 1. Install with: pip install -r requirements.txt | |
| # 2. For Apple Silicon: PyTorch will automatically use MPS acceleration | |
| # 3. Optional packages can be installed separately if needed | |
| # 4. Model files (~6GB) will be downloaded on first run | |
| # ============================================================================= | |