#!/usr/bin/env python3 """ Quick dependency checker - shows exactly what's missing """ import sys print("=" * 80) print("TRANSCRIPTORAI - DEPENDENCY CHECK") print("=" * 80) print() # Critical packages packages = { "CRITICAL - LLM": [ ("huggingface_hub", "HuggingFace API - WITHOUT THIS, QUALITY SCORE = 0.00"), ], "CRITICAL - File Processing": [ ("docx", "python-docx - DOCX file extraction"), ("pdfplumber", "pdfplumber - PDF file extraction"), ], "CRITICAL - Web UI": [ ("gradio", "Gradio - Web interface"), ], "Important - Data Processing": [ ("pandas", "Pandas - Data manipulation"), ("numpy", "NumPy - Numerical operations"), ], "Important - Reporting": [ ("reportlab", "ReportLab - PDF generation"), ("matplotlib", "Matplotlib - Charts"), ], "Important - NLP": [ ("tiktoken", "TikToken - Token counting"), ("nltk", "NLTK - Text processing"), ("sklearn", "scikit-learn - Text analysis"), ], "Standard": [ ("requests", "Requests - HTTP calls"), ] } all_installed = True missing_critical = [] missing_other = [] for category, pkg_list in packages.items(): print(f"{category}:") for module, description in pkg_list: try: __import__(module) print(f" ✅ {description}") except ImportError: print(f" ❌ {description}") all_installed = False if "CRITICAL" in category: missing_critical.append(module) else: missing_other.append(module) print() print("=" * 80) if all_installed: print("✅ ALL DEPENDENCIES INSTALLED!") print("=" * 80) print() print("You can now run:") print(" python test_hf_connection.py (test HuggingFace)") print(" python app.py (launch the app)") else: print("❌ MISSING DEPENDENCIES") print("=" * 80) print() if missing_critical: print("🚨 CRITICAL packages missing (app won't work):") for pkg in missing_critical: if pkg == "huggingface_hub": print(f" - {pkg} → pip install huggingface_hub") elif pkg == "docx": print(f" - python-docx → pip install python-docx") else: print(f" - {pkg} → pip install {pkg}") print() if missing_other: print("⚠️ Other packages missing (reduced functionality):") for pkg in missing_other: if pkg == "sklearn": print(f" - scikit-learn → pip install scikit-learn") else: print(f" - {pkg} → pip install {pkg}") print() print("=" * 80) print("EASIEST FIX - Install everything at once:") print("=" * 80) print() print("From Windows PowerShell:") print(" cd \\\\wsl.localhost\\Ubuntu\\home\\john\\TranscriptorEnhanced") print(" pip install -r requirements.txt") print() print("This will install all 13 packages in 2-5 minutes.") print() sys.exit(0 if all_installed else 1)